-
Notifications
You must be signed in to change notification settings - Fork 12
52 lines (43 loc) · 1.32 KB
/
gh-pages.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
name: GitHub Pages
on: [push]
jobs:
document:
runs-on: ubuntu-20.04
container:
image: ghcr.io/ricosjp/allgebra/cuda11_7/clang13/oss:22.05.4 #FIXME doxygen+clang14 bug
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install doxygen and graphviz
run: |
apt update
apt install -y doxygen graphviz
- name: work around permission issue
run: git config --global --add safe.directory /__w/monolish/monolish
- name: Generate document for current commit
run: |
cmake --preset=cpu-none-none
cmake --build build/cpu-none-none --target document
mv build/cpu-none-none/html .
- uses: actions/checkout@v2
with:
ref: gh-pages
path: public
- name: Update master document
if: ${{ github.ref == 'refs/heads/master' }}
run: |
rm -rf public/master
mv html public/master
- name: Update tag document
if: ${{ startsWith(github.ref, 'refs/tags' ) }}
run: |
export tag_name=$(basename ${{ github.ref }})
rm -rf public/${tag_name}
mv html public/${tag_name}
- name: deploy_pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public/
force_orphan: true