-
Notifications
You must be signed in to change notification settings - Fork 2.7k
73 lines (64 loc) · 2.34 KB
/
Copy pathdocs.yml
File metadata and controls
73 lines (64 loc) · 2.34 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: docs
on:
push:
branches: [master]
pull_request:
workflow_dispatch:
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
DOXYGEN_VERSION: 1.18.0
DOXYGEN_SHA256: 14fa81bdc34171edb5f1f02b1d60e74802f0439b77fa44e592565d517d72df90
permissions:
contents: read
# One docs build per branch; superseded PR pushes are cancelled. The deploy job
# has its own non-cancelling "pages" group so an in-flight deployment finishes.
concurrency:
group: docs-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
persist-credentials: false
- name: install doxygen ${{ env.DOXYGEN_VERSION }} and graphviz
run: |
set -euo pipefail
tag="Release_${DOXYGEN_VERSION//./_}"
curl -fsSL -o doxygen.tar.gz \
"https://github.com/doxygen/doxygen/releases/download/${tag}/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz"
echo "${DOXYGEN_SHA256} doxygen.tar.gz" | sha256sum --check
sudo tar -xzf doxygen.tar.gz -C /opt
echo "/opt/doxygen-${DOXYGEN_VERSION}/bin" >> "$GITHUB_PATH"
sudo apt-get update -q
sudo apt-get install -y -q graphviz
# doxygen runs with WARN_AS_ERROR, so any documentation warning fails here.
- name: generate documentation
run: |
doxygen --version
python3 doxybuild.py --with-dot
mv dist/doxygen/jsoncpp-api-html-* site
- uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: site
deploy:
name: deploy to GitHub Pages
# Only master may publish; a workflow_dispatch from any other branch just
# builds as a check and must not replace the production documentation.
if: github.ref == 'refs/heads/master'
needs: build
runs-on: ubuntu-latest
permissions:
pages: write # to publish the Pages deployment
id-token: write # to verify the deployment originates from this workflow
concurrency:
group: pages
cancel-in-progress: false
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0