-
Notifications
You must be signed in to change notification settings - Fork 3
65 lines (59 loc) · 1.81 KB
/
python-app.yml
File metadata and controls
65 lines (59 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Documentation Viewer
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Set up Poetry
uses: Gr1N/setup-poetry@v4
- name: Install dependencies
run: poetry install
- name: Run black
run: poetry run black --check .
- name: Run typechecker
run: poetry run mypy src --ignore-missing-imports
- name: Run linter
run: poetry run pylint src
build:
runs-on: ubuntu-18.04
needs: lint
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Set up Poetry
uses: Gr1N/setup-poetry@v4
- name: Install dependencies
run: poetry install
- name: Run app
run: poetry run python src/main.py ${{ secrets.GITHUB_TOKEN }}
- name: Deploy to GH pages
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: gen
# - name: Copy to website
# uses: andstor/copycat-action@v3
# with:
# personal_token: ${{ secrets.CI_PAT }}
# src_path: /.
# src_branch: gh-pages
# dst_path: /docs/reference/.
# dst_branch: gh-pages
# dst_owner: enso-org
# dst_repo_name: website
# clean: true