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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4
|
|
- 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@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Download book
|
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
with:
|
|
name: book
|
|
path: artifacts/book
|
|
|
|
- name: Deploy
|
|
uses: JamesIves/github-pages-deploy-action@fa24774553152dd7873cd16ebd8d959b010c5445 # v4.9.0
|
|
with:
|
|
branch: gh-pages
|
|
folder: artifacts/book
|
|
target-folder: docs/book
|