-
Notifications
You must be signed in to change notification settings - Fork 1k
47 lines (42 loc) · 1.15 KB
/
book.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
name: mdbook
on:
push:
branches:
- main
- master
- "releases/*"
pull_request:
branches:
- main
- master
types:
- closed
jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.10'
# mdbook-version: 'latest'
- run: mdbook build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.DEPLOY_KEY }}
publish_dir: ./book
publish_branch: gh-pages
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
- name: Deploy Golang-China
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.GOLANG_CHINA_DEPLOY_KEY }}
external_repository: golang-china/gopl-zh
publish_dir: ./book
publish_branch: gh-pages
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'