forked from lanl/ELEMENTS
-
Notifications
You must be signed in to change notification settings - Fork 3
64 lines (51 loc) · 1.82 KB
/
Docs.yaml
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
# Build, test, and install on different versions of Ubuntu
name: Linux
on:
push:
branches: [master]
env:
# CMake configuration for build with docs
CMAKE_CONFIG_FLAGS: -DCMAKE_INSTALL_PREFIX=/home/runner/work/install -DCMAKE_BUILD_TYPE=Release -DWITH_DOCS=ON -DCMAKE_INSTALL_DOCDIR=/home/runner/work/install/docs
jobs:
publish-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout master branch
uses: actions/checkout@v3
with:
submodules: true
- name: Install build dependencies
run: |
pip install -IU -r ${{github.workspace}}/docs/sphinx-dependencies.txt
sudo apt-get install doxygen -y
- name: Configure CMake to build the docs
run: cmake ${{env.CMAKE_CONFIG_FLAGS}} -B ${{github.workspace}}/build
- name: Build ELEMENTS with docs
run: cmake --build ${{github.workspace}}/build --verbose
- name: Install ELEMENTS with docs
run: cmake --install ${{github.workspace}}/build
- name: Clear out everything in directory except .git
run: |
mv .git ..
rm -rf *
mv ../.git .
- name: Checkout gh-pages branch
uses: actions/checkout@v3
with:
ref: gh-pages
- name: Configure git information
run: |
git config --global user.name Jan Kiviaho
git config --global user.email jfk115@msstate.edu
#- name: Update/add doc files
# run: |
# cp -r /home/runner/work/install/docs/* .
# git add -A
# git commit -m "Automated publication of documentation"
- name: Push changes
# You may pin to the exact commit or the version.
# uses: ad-m/github-push-action@40bf560936a8022e68a3c00e7d2abefaf01305a6
uses: ad-m/github-push-action@v0.6.0
with:
github_token: ${{secrets.GITHUB_TOKEN}}
branch: gh-pages