forked from near/nearcore
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (42 loc) · 1.01 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
name: Book
on:
push:
branches:
- master
pull_request:
paths:
- 'docs/**'
- '.github/workflows/book.yml'
jobs:
book:
name: Book
runs-on: ubuntu-latest
env:
MDBOOK_VERSION: '0.4.21'
steps:
- uses: actions/checkout@v2
- name: Install mdbook
run: |
curl -L https://github.com/rust-lang/mdBook/releases/download/v$MDBOOK_VERSION/mdbook-v$MDBOOK_VERSION-x86_64-unknown-linux-gnu.tar.gz | tar xz -C ~/.cargo/bin
- name: Build
run: mdbook build
working-directory: docs
- uses: actions/upload-artifact@v2
with:
name: book
path: target/book
deploy:
name: Deploy
runs-on: ubuntu-latest
permissions:
contents: write
needs: book
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- uses: actions/download-artifact@v2
with:
name: book
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: .