forked from WasmEdge/WasmEdge
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (52 loc) · 1.36 KB
/
mdbook.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: MDBOOK
on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'info'
push:
branches: [ master ]
paths:
- 'docs/book/**'
pull_request:
branches: [ master ]
paths:
- 'docs/book/**'
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
# mdbook-version: '0.4.10'
mdbook-version: 'latest'
- name: Create work dir
run: |
cd docs/book/
mkdir target
- name: Build EN version
run: |
cd docs/book/en
mdbook build
cp -r book ../target/en
- name: Build ZH version
run: |
cd docs/book/zh
mdbook build
cp -r book ../target/zh
- name: Publish EN version
if: ${{ github.event_name == 'push' }}
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB_WWW }}
with:
source-directory: 'docs/book/target'
destination-github-username: 'WasmEdge'
destination-repository-name: 'www'
target-directory: 'book'
user-email: [email protected]
target-branch: main