-
Notifications
You must be signed in to change notification settings - Fork 30
45 lines (38 loc) · 1.25 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
name: GitHub Pages
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install Ubuntu
run: |
sudo apt update
sudo apt install -y build-essential git cmake libgsl-dev libxerces-c-dev xsdcxx || true
- name: Build
run: |
mkdir -p build/generated/src
pushd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make inlined_xsd
pushd generated
wget https://github.com/rust-lang-nursery/mdBook/releases/download/v0.3.1/mdbook-v0.3.1-x86_64-unknown-linux-gnu.tar.gz
tar xaf *.tar.gz
../../util/generateDoc.py --mdbook -O src ../schema/scenario_current.xsd ../../schema/scenario_*.xsd
ln -s $(ls src/ | egrep "schema-[0-9]" | sort -nr -t- -k2 | head -n1) src/schema-latest.md
./mdbook build
popd && popd
cp util/fourier.html build/generated/book/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/generated/book