-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 945 Bytes
/
deploy.yaml
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: Deploy book on GitHub Pages
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: rust-cargo-install
uses: actions-rs/install@v0.1.2
with:
crate: mdbook
version: ^0.4
use-tool-cache: true
use-cache: true
- name: Build by mdbook
run: mdbook build ./
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: artifact
path: book
deploy:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Download Artifact
uses: actions/download-artifact@v4.1.7
with:
name: artifact
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./artifact
publish_branch: gh-pages