Skip to content

Commit

Permalink
ci: add github action to verify and deploy book
Browse files Browse the repository at this point in the history
  • Loading branch information
giusdp committed Dec 20, 2023
1 parent f5a6b33 commit d14b4a0
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Docs book

on:
push:
branches:
- main
pull_request:

jobs:
mdbook:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: "latest"

- run: mdbook build design

deploy:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3

- name: Check for missing pages in SUMMARY.md
working-directory: ./design
run: ./verify_summary.sh

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: "latest"

- name: Build
working-directory: ./design
run: mdbook build

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
# Only deploy if pushed to the main branch
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/book
# Don't store history of gh-pages branch
# This ensures that the repository size doesn't grow too much
force_orphan: true

0 comments on commit d14b4a0

Please sign in to comment.