Skip to content

Commit 6638caa

Browse files
lums658claude
andcommitted
Fix GitHub Actions workflows
- Update CMake variable names (DNWGRAPH_BUILD_* instead of DNW_GRAPH_BUILD_*) - Replace unavailable custom container with standard ubuntu-latest runner - Use peaceiris/actions-gh-pages for deployment - Only build docs on master branch push - Update to actions/checkout@v4 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 85d08eb commit 6638caa

File tree

3 files changed

+41
-47
lines changed

3 files changed

+41
-47
lines changed

.github/workflows/build_cmake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
mkdir build
4949
cd build
5050
export TBBROOT=/opt/intel/oneapi/tbb/latest
51-
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_COMPILER=g++-11 -DNW_GRAPH_BUILD_DOCS=OFF -DNW_GRAPH_BUILD_TESTS=ON
51+
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_COMPILER=g++-11 -DNWGRAPH_BUILD_DOCS=OFF -DNWGRAPH_BUILD_TESTS=ON
5252
5353
- name: make
5454
run: |

.github/workflows/build_cmake_mac.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
mkdir build
3939
cd build
4040
export TBBROOT=/opt/intel/oneapi/tbb/latest
41-
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_COMPILER=g++-11 -DNW_GRAPH_BUILD_DOCS=OFF -DNW_GRAPH_BUILD_TESTS=ON
41+
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_COMPILER=g++-11 -DNWGRAPH_BUILD_DOCS=OFF -DNWGRAPH_BUILD_TESTS=ON
4242
4343
- name: make
4444
run: |

.github/workflows/gh-pages.yml

Lines changed: 39 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2,60 +2,54 @@ name: gh-pages
22

33
on:
44
push:
5-
pull_request:
5+
branches: [ master ]
6+
workflow_dispatch:
67

78
jobs:
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

Comments
 (0)