forked from managarm/managarm
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (58 loc) · 2.4 KB
/
docs.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: Documentation
on: [push, pull_request]
jobs:
build-docs:
name: Build documentation
runs-on: ubuntu-20.04
steps:
- name: Install prerequisites
run: |
sudo apt-get install doxygen ninja-build
sudo pip3 install meson
- name: Install mdbook
run: |
set -e
wget -O mdbook.tar.gz https://github.com/rust-lang/mdBook/releases/download/v0.4.20/mdbook-v0.4.20-x86_64-unknown-linux-gnu.tar.gz
sha512sum --check <<EOF
bc184123378814c0d28ffb13d88736bcfab64cfabb140f42c331e41f4fd7ea3fee24e480f78fe8f6f3f13bddd57bda7dcc215e6fc7f4a606177903dd10881a74 mdbook.tar.gz
EOF
tar xf mdbook.tar.gz
sudo install -D mdbook /usr/local/bin/mdbook
- name: Install rsync-ssl
run: |
wget https://raw.githubusercontent.com/WayneD/rsync/c3f7414c450faaf6a8281cc4a4403529aeb7d859/rsync-ssl
sudo install -D rsync-ssl /usr/local/bin/rsync-ssl
- name: Checkout
uses: actions/checkout@v2
with:
path: src/
- name: Configure
run: meson build/ src/ -Dbuild_docs=true
- name: Build handbook
run: ninja mdbook
working-directory: build/
- name: Build hel reference
run: ninja hel-api
working-directory: build/
- name: Upload handbook artifact
uses: actions/upload-artifact@v2
with:
name: handbook
path: build/docs/
- name: Upload hel reference artifact
uses: actions/upload-artifact@v2
with:
name: hel-reference
path: build/hel-api/html/
- name: Upload handbook to docs.managarm.org
if: github.ref == 'refs/heads/master'
env:
RSYNC_PASSWORD: ${{ secrets.RSYNC_DOCUMENTATION_PASSWD }}
run:
rsync-ssl -a --delete build/docs/ [email protected]::docs/handbook
- name: Upload hel reference to rsync.managarm.org
if: github.ref == 'refs/heads/master'
env:
RSYNC_PASSWORD: ${{ secrets.RSYNC_DOCUMENTATION_PASSWD }}
run:
rsync-ssl -a --delete build/hel-api/html/ [email protected]::docs/hel-api