Skip to content

Commit 96c94fc

Browse files
committed
Add docs workflow
1 parent b8f0953 commit 96c94fc

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

‎.github/workflows/docs.yml‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Deploy docs
2+
3+
on:
4+
push:
5+
branches: [master, docs]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
env:
21+
MDBOOK_VERSION: 0.5.4
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Install mdbook
25+
run: |
26+
mkdir -p "$HOME/.local/bin"
27+
curl -sSL "https://github.com/rust-lang/mdBook/releases/download/v${MDBOOK_VERSION}/mdbook-v${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz" \
28+
| tar -xz -C "$HOME/.local/bin"
29+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
30+
- name: Build book
31+
run: mdbook build docs
32+
- uses: actions/upload-pages-artifact@v3
33+
with:
34+
path: docs/book
35+
36+
deploy:
37+
needs: build
38+
runs-on: ubuntu-latest
39+
environment:
40+
name: github-pages
41+
url: ${{ steps.deployment.outputs.page_url }}
42+
steps:
43+
- id: deployment
44+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)