-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.09 KB
/
main.yaml
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
name: deploy-gh-pages
# Only run this when the master branch changes
on:
push:
branches:
- stable
# This job installs dependencies, builds the project's doc, and pushes it to `gh-pages`
jobs:
deploy-gh-pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Install dependencies
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Install dependencies
run: |
pip install -r dev-requirements.txt
- name: Build the project
run: |
sphinx-build docs html
#TODO build and push to pypi
python -m build
- name: Publish python module
run: |
python -m build
twine upload --verbose dist/* -u $PYPI_API_USER -p $PYPI_API_KEY
if: github.ref == 'refs/head/stable'
# Push the HTML to github-pages
- name: Publish generated GitHub pages
uses: peaceiris/actions-gh-pages@v3
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: html/
force_orphan: true