Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bart Louwers <bart@emeel.net>
56 lines
1.6 KiB
YAML
56 lines
1.6 KiB
YAML
name: gh-pages-mdbook
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
paths:
|
|
- 'docs/mdbook/**'
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'docs/mdbook/**'
|
|
|
|
jobs:
|
|
gh-pages-mdbook-build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4
|
|
- uses: extractions/setup-just@f8a3cce218d9f83db3a2ecd90e41ac3de6cdfd9b # v3.1.0
|
|
- name: Setup mdBook
|
|
uses: peaceiris/actions-mdbook@ee69d230fe19748b7abf22df32acaa93833fad08 # v2.0.0
|
|
- name: Install Dependencies
|
|
shell: bash
|
|
run: sudo apt-get install -y libwayland-dev libxkbcommon-dev # Required for winit
|
|
- name: Install mdbook-mermaid
|
|
run: cargo install mdbook-mermaid
|
|
- name: Build
|
|
working-directory: docs/mdbook
|
|
shell: bash
|
|
run: mdbook build
|
|
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
|
with:
|
|
name: book
|
|
path: docs/mdbook/book/
|
|
|
|
gh-pages-mdbook-deploy:
|
|
needs: gh-pages-mdbook-build
|
|
if: github.event_name != 'pull_request'
|
|
name: Deploy
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4
|
|
- name: Download book
|
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v4
|
|
with:
|
|
name: book
|
|
path: artifacts/book
|
|
|
|
- name: Deploy
|
|
uses: JamesIves/github-pages-deploy-action@d92aa235d04922e8f08b40ce78cc5442fcfbfa2f # v4.8.0
|
|
with:
|
|
branch: gh-pages
|
|
folder: artifacts/book
|
|
target-folder: docs/book
|