-
Notifications
You must be signed in to change notification settings - Fork 47
49 lines (47 loc) · 1.26 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
name: Deploy tket C++ documentation
on:
push:
branches:
- main
paths:
- 'tket/src/**'
jobs:
build_docs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install Doxygen
run: sudo apt update && sudo apt install -y doxygen graphviz
- name: Build Doxygen docs
run: cd tket && doxygen
- name: Upload artefact
uses: actions/upload-artifact@v4
with:
name: tket_docs
path: tket/doc/html/
publish_docs:
needs: build_docs
concurrency: gh_pages
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
ref: gh-pages
- name: Download artefact
uses: actions/download-artifact@v4
with:
name: tket_docs
path: api/
- name: Configure git
run: |
git config --global user.email "[email protected]"
git config --global user.name "«$GITHUB_WORKFLOW» github action"
- name: Remove old docs
run: git rm -r docs/tket/api
- name: Add generated docs to repository
run: |
mv api/ docs/tket/
git add -f docs/tket/api
git commit --allow-empty -m "Add generated tket C++ documentation."
- name: Publish docs
run: git push origin gh-pages:gh-pages