-
Notifications
You must be signed in to change notification settings - Fork 0
executable file
·59 lines (48 loc) · 1.76 KB
/
publish-documentation.yml
File metadata and controls
executable file
·59 lines (48 loc) · 1.76 KB
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
# This is the file responsible for building the documentation and tests on
# github using github-actions and then publishing both the documentation and
# test results + code coverage as a github page. Within the file, each step has
# a name which describes its purpose.
name: publish-documentation
on:
push:
branches:
master
# While some jobs should be parallisable, it was opted not to parallelise
# since jobs run on different machines on github actions, and there is
# no build in support for paralellising steps.
jobs:
build_documentation:
runs-on: ubuntu-latest
steps:
- name: Checkout the master branch
uses: actions/checkout@v3
- name: Install Doxygen and lcov
run: sudo apt-get install doxygen lcov -y
- name: Install Sphinx
run: pip3 install breathe exhale sphinx sphinx-rtd-theme sphinx-rtd-dark-mode matplotlib pandas sphinxcontrib-mermaid
- name: Install Mermaid
run: |
npm install @mermaid-js/mermaid-cli
- name: Make all scripts executable
run: chmod +777 scripts/**/*
- name: Build all main, tests and documentation
run: sh ./scripts/build/all.sh
- name: Run tests
run: sh ./scripts/standalone/test.sh
- name: Setup documentation git repository
run: |
cd docs/
touch .nojekyll
rm .gitignore
git init
git add .
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -m 'deploy'
- name: Push to github pages
uses: ad-m/github-push-action@v0.6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
force: true
directory: ./docs/