-
Notifications
You must be signed in to change notification settings - Fork 54
50 lines (45 loc) · 1.45 KB
/
build.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
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
deploy:
name: Build mdbook
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- 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
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
# jobs:
# build:
# name: Build Gitbook
# runs-on: ubuntu-latest
# steps:
# # Check out the repo first
# - name: Checkout code
# uses: actions/checkout@v2
# # Run this action to publish gitbook
# - name: Publish
# uses: tuliren/[email protected]
# with:
# # specify either github_token or personal_token
# github_token: ${{ secrets.GITHUB_TOKEN }}
# # personal_token: ${{ secrets.PERSONAL_TOKEN }}