@@ -2,60 +2,54 @@ name: gh-pages
22
33on :
44 push :
5- pull_request :
5+ branches : [ master ]
6+ workflow_dispatch :
67
78jobs :
89 build :
910 runs-on : ubuntu-latest
10- name : build
11- container : amath583/gh-pages
11+ name : Build and deploy documentation
12+
1213 steps :
13- - name : ' Some testing of environment'
14- run : |
15- echo "Hello World"
16- /bin/ls -la /usr/local/bin
17- /bin/pwd
18- /bin/hostname
19- echo "'uname -s' is:"
20- echo "uname: " $(uname)
21- echo "uname -m: " $(uname -m)
22- echo "uname -r:" $(uname -r)
23- echo "uname -s: " $(uname -s)
24- echo "uname -v: " $(uname -v)
25- - name : ' Checkout NWgraph'
26- uses : actions/checkout@master
14+ - name : Checkout NWgraph
15+ uses : actions/checkout@v4
2716 with :
28- fetch-depth : 0 #
29- - name : ' Build compile_commands.json'
17+ fetch-depth : 0
18+
19+ - name : Install dependencies
3020 run : |
31- mkdir -p build
32- cd build ; TBBROOT=/opt/intel/oneapi/tbb/2021.5.1 cmake .. -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
33- - name : ' Build documentation'
21+ sudo apt-get update
22+ sudo apt-get install -y doxygen graphviz
23+ pip install sphinx sphinx_rtd_theme breathe exhale sphinxcontrib-bibtex
24+
25+ - name : Install TBB
3426 run : |
35- /bin/pwd
36- /bin/ls -la
37- pushd doc-src/sphinx ; make pages ; popd
38- touch docs/.nojekyll
39- shell : bash
40- - name : Commit local changes
27+ wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
28+ sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
29+ rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
30+ sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
31+ sudo apt-get update
32+ sudo apt-get install -y intel-oneapi-tbb-devel
33+
34+ - name : Build compile_commands.json
4135 run : |
42- git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
43- git config --local user.name "github-actions[bot]"
44- git add ./docs
45- git commit -am "Build documentation"
46- - name : Prep for force push
36+ mkdir -p build
37+ cd build
38+ export TBBROOT=/opt/intel/oneapi/tbb/latest
39+ cmake .. -DCMAKE_CXX_COMPILER=g++ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DNWGRAPH_BUILD_DOCS=OFF
40+
41+ - name : Build documentation
4742 run : |
48- git config --global --add safe.directory /github/workspace
49- - name : Force push to destination branch
50- uses : ad-m/github-push-action@v0.5.0
43+ cd doc-src/sphinx
44+ make html
45+ mkdir -p ../../docs
46+ cp -r _build/html/* ../../docs/
47+ touch ../../docs/.nojekyll
48+
49+ - name : Deploy to gh-pages
50+ uses : peaceiris/actions-gh-pages@v3
51+ if : github.ref == 'refs/heads/master'
5152 with :
52- # Token for the repo
5353 github_token : ${{ secrets.GITHUB_TOKEN }}
54- # Destination branch to push changes
55- branch : gh-pages
56- # Use force push to fully overwrite the destination branch
57- force : true
58- # We have to push from the folder where files were generated.
59- # Same where the new repo was initialized in the previous step
60- # directory: ./doc-src/sphinx/_build/html
61- directory : ./docs
54+ publish_dir : ./docs
55+ force_orphan : true
0 commit comments