-
Notifications
You must be signed in to change notification settings - Fork 2
77 lines (61 loc) · 1.7 KB
/
wf-push.yml
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
66
67
68
69
70
71
72
73
74
75
76
77
name: Workflow Push
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install Tox
run: pip install tox
- name: Run lint
run: tox -e lint
- name: Run test
run: tox -e test
- name: Run build
run: tox -e build
deploy-docs:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
strategy:
fail-fast: false
matrix:
python-version: [ "3.10"]
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
pages: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install Tox
run: pip install tox
- name: Build Doc
run: tox -e doc
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html
force_orphan: true