-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (39 loc) · 1.15 KB
/
deploy-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
name: Build and Deploy Docs
on:
push:
branches:
- main
- dev
tags:
- '*'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
fetch-depth: 0 # Ensures all history is fetched for sphinx-multiversion to detect all tags and branches
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v2
- name: Install Dependencies
run: |
pip install poetry
poetry install
- name: Build Docs with sphinx-multiversion
run: |
poetry run sphinx-multiversion docs docs/_build/html
- name: Prepare Deployment
run: |
touch ./docs/_build/html/.nojekyll
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html