-
Notifications
You must be signed in to change notification settings - Fork 10
61 lines (59 loc) · 1.99 KB
/
gh-pages.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
name: gh-pages
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
name: build
container: amath583/gh-pages
steps:
- name: 'Some testing of environment'
run: |
echo "Hello World"
/bin/ls -la /usr/local/bin
/bin/pwd
/bin/hostname
echo "'uname -s' is:"
echo "uname: " $(uname)
echo "uname -m: " $(uname -m)
echo "uname -r:" $(uname -r)
echo "uname -s: " $(uname -s)
echo "uname -v: " $(uname -v)
- name: 'Checkout NWgraph'
uses: actions/checkout@master
with:
fetch-depth: 0 #
- name: 'Build compile_commands.json'
run: |
mkdir -p build
cd build ; TBBROOT=/opt/intel/oneapi/tbb/2021.5.1 cmake .. -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- name: 'Build documentation'
run: |
/bin/pwd
/bin/ls -la
pushd doc-src/sphinx ; make pages ; popd
touch docs/.nojekyll
shell: bash
- name: Commit local changes
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add ./docs
git commit -am "Build documentation"
- name: Prep for force push
run: |
git config --global --add safe.directory /github/workspace
- name: Force push to destination branch
uses: ad-m/[email protected]
with:
# Token for the repo
github_token: ${{ secrets.GITHUB_TOKEN }}
# Destination branch to push changes
branch: gh-pages
# Use force push to fully overwrite the destination branch
force: true
# We have to push from the folder where files were generated.
# Same where the new repo was initialized in the previous step
# directory: ./doc-src/sphinx/_build/html
directory: ./docs