-
Notifications
You must be signed in to change notification settings - Fork 328
40 lines (34 loc) · 1012 Bytes
/
guide.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
name: Hermes Guide
on:
push:
branches:
- master
tags:
- v[0-9]+.*
pull_request:
paths:
- guide/**
# Cancel previous runs of this workflow when a new commit is added to the PR, branch or tag
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
guide:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install mdbook and plugins
uses: taiki-e/install-action@v2
with:
tool: mdbook,mdbook-mermaid,mdbook-template,mdbook-toc
- name: Build guide
run: |
cd guide
mdbook build
# Only deploy guide when releasing a new version of Hermes
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./guide/book