-
Notifications
You must be signed in to change notification settings - Fork 347
61 lines (48 loc) · 1.4 KB
/
deploy_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
name: Deploy Manual
on:
push:
branches:
- master
jobs:
pre_deploy:
runs-on: ubuntu-20.04
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
concurrent_skipping: always
deploy:
needs: pre_deploy
if: needs.pre_deploy.outputs.should_skip != 'true'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Install jq
run: sudo apt-get install -y jq
- uses: dtolnay/[email protected]
- run: cargo doc
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.34'
- name: Build manual
run: mdbook build
working-directory: manual
- name: Build translated manual
run: mdbook build
working-directory: translation/zh-CN/manual-zh-CN
- name: Add rustdoc output
run: cp -r target/doc manual/book/rustdoc
- name: Add translated manual output
run: cp -r translation/zh-CN/manual-zh-CN/book manual/book/zh-CN
- name: Add homepage
run: cp -r homepage/* manual/book/
- name: Deploy to GitHub pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: manual/book
single-commit: true
force: true