Skip to content

Commit 2953186

Browse files
committed
Add workflow
1 parent 9279b23 commit 2953186

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/deploy.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: 🚀 Deploy
2+
on:
3+
push:
4+
branches: ["*"]
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
- name: Install mdbook
13+
env: { MDBOOK_VERSION: 0.4.40 }
14+
run: |
15+
mkdir mdbook
16+
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v${{ env.MDBOOK_VERSION }}/mdbook-v${{ env.MDBOOK_VERSION }}-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
17+
echo `pwd`/mdbook >> $GITHUB_PATH
18+
- name: Generate Book
19+
run: ./generate-book.py
20+
- name: Upload Artifact
21+
uses: actions/upload-pages-artifact@v3
22+
with: { path: ./book }
23+
24+
deploy:
25+
needs: build
26+
27+
permissions:
28+
pages: write
29+
id-token: write
30+
31+
environment:
32+
name: github-pages
33+
url: ${{ steps.deployment.outputs.page_url }}
34+
35+
runs-on: ubuntu-latest
36+
steps:
37+
- id: deployment
38+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)