-
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.13 KB
/
build-docs.yml
File metadata and controls
46 lines (38 loc) · 1.13 KB
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
name: Docs
on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install Python dependencies from requirements.txt
run: pip install -r doc/requirements.txt
- name: Install Doxygen
run: sudo apt-get install doxygen -y
shell: bash
- name: Build documentation
run: sphinx-build doc _build
- name: Set CNAME if in public repo
id: cname
run: |
if [ "${{ github.repository }}" = "erbsland-dev/erbsland-cpp-re" ]; then
echo "CNAME=re.erbsland.dev" >> $GITHUB_ENV
fi
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true
cname: ${{ env.CNAME }}