Skip to content

Commit ec1dff0

Browse files
Update GitHub Actions workflow for mdBook deployment
1 parent c3a6c52 commit ec1dff0

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/deploy-docs.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Deploy mdBook to Pages
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
jobs:
13+
deploy:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Install mdBook
20+
run: |
21+
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.37/mdbook-v0.4.37-x86_64-unknown-linux-gnu.tar.gz | tar -xz
22+
sudo mv mdbook /usr/local/bin/
23+
24+
- name: Build with mdBook
25+
run: |
26+
cd docs/eter
27+
mdbook build
28+
29+
- name: Setup Pages
30+
uses: actions/configure-pages@v4
31+
32+
- name: Upload artifact
33+
uses: actions/upload-pages-artifact@v3
34+
with:
35+
path: 'docs/eter/book'
36+
37+
- name: Deploy to GitHub Pages
38+
id: deployment
39+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)