-
Notifications
You must be signed in to change notification settings - Fork 38
55 lines (47 loc) · 1.26 KB
/
docs.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
#
# Build and deploy documentation
#
name: Docs
on:
push:
branches: [main]
paths:
- 'HinetPy/*.py'
- 'docs/**'
pull_request:
paths:
- 'HinetPy/*.py'
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
deploy-docs:
name: Docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# fecth all history so that setuptools-scm works
fetch-depth: 0
- name: Set up Python 3.x
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install -r requirements.txt
python -m pip install build sphinx sphinx-intl sphinx_rtd_theme
python -m build --sdist
python -m pip install dist/*
- name: Build documentation
run: make doc
- name: Deploy to GitHub Pages
uses: peaceiris/[email protected]
# Only deploy on master branch
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./docs/_build/html