-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (44 loc) · 1.35 KB
/
build-docs.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
46
47
48
49
50
51
52
53
54
name: Publish Documentation
on:
push:
branches:
- main
env:
PYTHON_VERSION: "3.11"
POETRY_VERSION: "1.8.1"
jobs:
build-and-publish-docs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: ${{ env.POETRY_VERSION }}
- name: Generate Doxygen & Sphinx documentation
run: |
./generate_docs.sh
- name: Create .nojekyll file
run: |
touch _build/html/.nojekyll
# This creates a branch called gh-pages and deploys the contents of the _build/html folder to GitHub Pages.
# GitHub automatically creates the token to use in the workflow
- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: docs/_build/html
# Automatically remove deleted files from the deploy branch
clean: true
commit-message: "Deploy GitHub Pages"
token: ${{ secrets.GITHUB_TOKEN }}