forked from viperproject/prusti-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (57 loc) · 1.62 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
61
62
63
64
65
66
67
68
name: Build GitHub pages
on:
workflow_dispatch:
push:
branches: [master, staging, trying]
paths: 'docs/**'
pull_request:
branches: [master]
paths: 'docs/**'
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Check for broken links
uses: lycheeverse/[email protected]
with:
args: --verbose --no-progress './**/*.md'
fail: true
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
# - name: Spellcheck
# uses: rojopolis/[email protected]
deploy:
# Only deploy on push to master
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
path: "repo"
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: "latest"
- name: Prepare output directory
run: |
mkdir -p output
- name: Build user guide
run: |
cd repo/docs/user-guide
mdbook build -d ../../../output/user-guide
- name: Build dev guide
run: |
cd repo/docs/dev-guide
mdbook build -d ../../../output/dev-guide
- name: Copy static content
run: |
cp -r repo/docs/static/* output
- name: Publish to GitHub pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./output
keep_files: true