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 efea1c1 commit 6120e63
Showing 1 changed file with 12 additions and 27 deletions.
39 changes: 12 additions & 27 deletions .github/workflows/mdbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,12 @@
#
# To get started with mdBook see: https://rust-lang.github.io/mdBook/index.html
#
name: Deploy z2o-k7e to Pages
name: Deploy mdBook site 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 @@ -35,31 +28,23 @@ jobs:
# Build job
build:
runs-on: ubuntu-latest
env:
MDBOOK_VERSION: 0.4.36
steps:
- 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
- uses: actions/checkout@v4
- name: Install mdBook
run: |
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
cargo install --version ${MDBOOK_VERSION} mdbook
cargo install mdbook-katex
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3

uses: actions/configure-pages@v5
- name: Build with mdBook
run: mdbook build
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
path: ./book

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

0 comments on commit 6120e63

Please sign in to comment.