-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (49 loc) · 1.48 KB
/
github-actions-release.yml
File metadata and controls
51 lines (49 loc) · 1.48 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
name: Release Python Package to PyPI
on:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install build
- name: Build package
run: make dist
- name: Release package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
docs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Upgrade PIP
run: python -m pip install --upgrade pip setuptools wheel
- name: Install dependencies
run: |
pip install -r requirements_dev.txt
pip install sphinxcontrib-versioning
pip install "jinja2<3.0.0"
pip install "markupsafe==2.0.1"
- name: Build docs
run: |
sphinx-versioning build -a -b -t -p tags -B main -r main -w main docs docs/_build/html
cp README.rst docs/_build/html
- name: Deploy to GH pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html