2021-12-24 16:08:23 +01:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
changes:
|
|
|
|
runs-on: ubuntu-latest
|
2022-03-16 13:14:44 +01:00
|
|
|
timeout-minutes: 15
|
2021-12-24 16:08:23 +01:00
|
|
|
outputs:
|
|
|
|
dirs: ${{ steps.filter.outputs.changes }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: dorny/paths-filter@v2
|
|
|
|
id: filter
|
|
|
|
with:
|
|
|
|
filters: |
|
|
|
|
docs: docs/**
|
|
|
|
deploy:
|
|
|
|
needs: [changes]
|
|
|
|
if: ${{ !contains(needs.changes.outputs.dirs, '[]') }}
|
|
|
|
runs-on: ubuntu-latest
|
2022-03-16 13:14:44 +01:00
|
|
|
timeout-minutes: 15
|
2021-12-24 16:08:23 +01:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup mdBook
|
|
|
|
uses: peaceiris/actions-mdbook@v1
|
|
|
|
with:
|
2022-03-16 13:14:44 +01:00
|
|
|
mdbook-version: "latest"
|
2021-12-24 16:08:23 +01:00
|
|
|
- name: Build mdbook
|
|
|
|
working-directory: ./docs
|
|
|
|
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: ./docs/book
|