forked from AIDASoft/podio
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (65 loc) · 2.2 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: publish-doc
on:
push:
workflow_dispatch:
concurrency:
group: pages
cancel-in-progress: true
jobs:
build-doc:
runs-on: ubuntu-latest
steps:
- name: Print info
run: echo ${{ github.event.push.ref }}
- uses: actions/checkout@v4
- uses: actions/configure-pages@v4
- uses: cvmfs-contrib/github-action-cvmfs@v3
- uses: aidasoft/run-lcg-view@v4
with:
container: el9
view-path: /cvmfs/sw-nightlies.hsf.org/key4hep
run: |
echo "::group::Install dependencies"
python3 -m pip install -r doc/requirements.txt
export PATH=/root/.local/bin:$PATH
echo -e "::endgroup::\n::group::Build podio"
cmake -B build . --install-prefix=$(pwd)/install \
-GNinja -DENABLE_SIO=ON -DENABLE_RNTUPLE=ON \
-DBUILD_TESTING=OFF \
-DCMAKE_CXX_STANDARD=17
cmake --build build --target install
export PYTHONPATH=$(pwd)/install/python:$PYTHONPATH
export LD_LIBRARY_PATH=$(pwd)/install/lib*/:$LD_LIBRARY_PATH
export ROOT_INCLUDE_PATH=$(pwd)/install/include
echo -e "::endgroup::\n::group::build doc"
sphinx-build -M html doc doc_output
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: doc_output/html
publish-doc-master:
needs: build-doc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: gh-pages
- uses: actions/download-artifact@v4
with:
name: github-pages
path: master
- name: Unpack artifact
run: |
tar -xvf master/artifact.tar
rm master/artifact.tar
- name: Commit and push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.email ${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com
git config --global user.name ${GITHUB_ACTOR}
git add master
git diff-index --quiet HEAD 2>&1 > /dev/null || git commit -m "Update latest documentation" && git push
# - name: Deploy to Github pages
# id: deployment
# uses: actions/deploy-pages@v4