-
Notifications
You must be signed in to change notification settings - Fork 4
59 lines (53 loc) · 1.52 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
56
57
58
59
# Copyright 2024 ETH Zurich and University of Bologna.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
# Author: Philip Wiese <[email protected]>
name: Sphinx Documentation
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
name: Build and publish documentation
permissions:
contents: write
pages: write
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/[email protected]
with:
persist-credentials: false
-
name: Install Dependencies
run: |
sudo apt-get update && sudo apt-get install -y doxygen
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
-
name: Build HTML
run : |
cd docs
make html
-
name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: html-docs
path: docs/_build_sphinx/html
-
name: Prepare Multipages
uses: rkdarst/gh-pages-multibranch@main
if: ${{ github.event_name == 'push' }}
with:
directory: docs/_build_sphinx/html
-
name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build_sphinx/html
force_orphan: true