Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3.0.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@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.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@37930b1c2abaa49bbe596cd826c3c89aef350131 # v4
|
|
with:
|
|
name: book
|
|
path: artifacts/book
|
|
|
|
- name: Deploy
|
|
uses: JamesIves/github-pages-deploy-action@4a3abc783e1a24aeb44c16e869ad83caf6b4cc23 # v4.7.4
|
|
with:
|
|
branch: gh-pages
|
|
folder: artifacts/book
|
|
target-folder: docs/book
|