Skip to content

Commit 044b028

Browse files
committed
Fix guide deploying
1 parent 2adc3bf commit 044b028

File tree

2 files changed

+41
-25
lines changed

2 files changed

+41
-25
lines changed

.github/workflows/build_guide.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/deploy_guide.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Deploy Guide to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
pages: write
14+
id-token: write
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Install latest mdbook
21+
run: |
22+
tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name')
23+
url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz"
24+
mkdir mdbook
25+
curl -sSL $url | tar -xz --directory=./mdbook
26+
echo `pwd`/mdbook >> $GITHUB_PATH
27+
28+
- name: Build Book
29+
run: mdbook build guide
30+
31+
- name: Setup Pages
32+
uses: actions/configure-pages@v4
33+
34+
- name: Upload artifact
35+
uses: actions/upload-pages-artifact@v3
36+
with:
37+
path: "book"
38+
39+
- name: Deploy to GitHub Pages
40+
id: deployment
41+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)