Merge upstream changes from informalsystems/hermes #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v3 | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./guide/book |