forked from gravelLab/tracts
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 1.06 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
# This workflow builds and deploys the documentation when there is a push event to either the main or devel branch
name: Documentation
on:
push:
branches:
- master
- devel
jobs:
docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install sphinx_rtd_theme myst_parser
pip install .
cd docs
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build Sphinx Documentation
run: |
sphinx-build docs/source _build
- name: Deploy Sphinx Documentation
uses: peaceiris/actions-gh-pages@v3
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true