Skip to content

Commit

Permalink
Update mdbook.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtpan666 authored Jun 12, 2024
1 parent 0115192 commit efea1c1
Showing 1 changed file with 29 additions and 13 deletions.
42 changes: 29 additions & 13 deletions .github/workflows/mdbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@
#
# To get started with mdBook see: https://rust-lang.github.io/mdBook/index.html
#
name: Deploy mdBook site to Pages
name: Deploy z2o-k7e to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
paths:
- "src/**"
- "po/**"
- "theme/**"
- "justfile"
- "book.toml"
- .github/workflows/mdbook.yml

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -28,22 +35,31 @@ jobs:
# Build job
build:
runs-on: ubuntu-latest
env:
MDBOOK_VERSION: 0.4.36
steps:
- uses: actions/checkout@v4
- name: Install mdBook
- uses: actions/checkout@v3

# Init build environment
- name: Install just
run: |
curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | sudo bash -s -- --to /bin
- name: Install cargo
run: |
mkdir mdbook
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.35/mdbook-v0.4.35-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
curl -sSL https://github.com/lzanini/mdbook-katex/releases/download/v0.5.8pub/mdbook-katex-v0.5.8-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh
rustup update
- name: Init build environment
run: just init-builder

# Build
- name: Build with mdBook
run: just build

# Upload artifact for Github pages
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Build with mdBook
run: mdbook build
uses: actions/configure-pages@v3

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@v1
with:
path: ./book

Expand All @@ -57,4 +73,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v2

0 comments on commit efea1c1

Please sign in to comment.