forked from graphql-rust/juniper
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (48 loc) · 1.21 KB
/
book.yml
File metadata and controls
60 lines (48 loc) · 1.21 KB
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
name: Book
on:
pull_request:
paths:
- 'docs/book/**'
push:
paths:
- 'docs/book/**'
jobs:
tests:
name: Test code examples
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Test via skeptic
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path docs/book/tests/Cargo.toml
deploy:
name: Deploy book on gh-pages
needs: [tests]
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install mdBook
uses: peaceiris/actions-mdbook@v1
- name: Render book
run: |
mdbook build -d gh-pages/master docs/book
- name: Deploy
uses: peaceiris/actions-gh-pages@v2.5.1
with:
emptyCommits: false
keepFiles: true
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: docs/book/gh-pages