forked from m-a-d-n-e-s-s/madness
-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (48 loc) · 1.87 KB
/
make_doxygen.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
name: publish-doxygen
# Trigger this when a pull request is merged (which implies pushing to master).
on:
push:
branches:
- master
jobs:
doxygen:
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v2
- name: Create clean gh-pages branch
run: git checkout -b gh-pages
- name: Install prerequisites Ubuntu packages
run: |
sudo apt-get update
sudo apt-get install ninja-build g++-9 liblapack-dev openmpi-bin libopenmpi-dev libtbb-dev doxygen
- name: configure
shell: bash
working-directory: ${{github.workspace}}
run: |
cmake -E make_directory ${{github.workspace}}/build
cd build && cmake $GITHUB_WORKSPACE
- name: build
shell: bash
working-directory: ${{github.workspace}}/build
run:
cd ${{github.workspace}}/build && make docs
- name: Move generated autodocs to target directory
working-directory: ${{github.workspace}}/build
run: mv doc/html ../api-doc
- name: Add generated autodocs to Git repo in the gh-pages branch
working-directory: ${{github.workspace}}
run: |
git config --global user.email "[email protected]"
git config --global user.name "$GITHUB_WORKFLOW GitHub action"
git add api-doc
git commit -am "Generated API doc"
- name: Publish autodocs as GitHub pages
run: git push -f origin gh-pages:gh-pages
- name: Result URLs
run: |
REPO_OWNER=$(echo $GITHUB_REPOSITORY | cut -d '/' -f 1)
REPO_NAME=$(echo $GITHUB_REPOSITORY | cut -d '/' -f 2)
echo "Formatted API docs: https://$REPO_OWNER.github.io/$REPO_NAME/api-doc"
echo ""
echo "GitHub pages branch: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/tree/gh-pages"