Skip to content

Commit 8dcd857

Browse files
Add github action to publish documentation
1 parent a56b563 commit 8dcd857

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches: ["template"]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build-docs:
19+
runs-on: ubuntu-latest
20+
container: registry.cern.ch/ngt-wp1.7/wp1.7-soa-wrapper@sha256:16432eae6635379637e67c4cc00334c46b6dce845b83da7e75fb754d24266897
21+
steps:
22+
- name: Checkout Repository
23+
uses: actions/checkout@v4
24+
- name: Build Docs
25+
run: |
26+
cmake -B ${{github.workspace}}/build
27+
cmake --build ${{github.workspace}}/build/docs --target docs
28+
mv ${{github.workspace}}/build/docs/html /root/
29+
- name: Upload Artifact
30+
uses: actions/upload-artifact@v4
31+
with:
32+
name: docs-artifact
33+
path: /root/html
34+
35+
deploy:
36+
needs: build-docs
37+
runs-on: ubuntu-latest
38+
environment:
39+
name: github-pages
40+
url: ${{ steps.deployment.outputs.page_url }}
41+
steps:
42+
- name: Download artifact
43+
uses: actions/download-artifact@v5
44+
with:
45+
name: docs-artifact
46+
- name: Setup Pages
47+
uses: actions/configure-pages@v5
48+
- name: Upload Pages Artifact
49+
uses: actions/upload-pages-artifact@v3
50+
with:
51+
path: .
52+
- name: Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v4
55+

0 commit comments

Comments
 (0)