Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

Commit f581b8d

Browse files
committed
ci: gh-pages build
Signed-off-by: Alex Chi <[email protected]>
1 parent e0e8d04 commit f581b8d

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/docs.yaml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: mdbook gh pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
16+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
17+
concurrency:
18+
group: "pages"
19+
cancel-in-progress: false
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v2
26+
- name: setup mdbook
27+
uses: peaceiris/actions-mdbook@v1
28+
with:
29+
mdbook-version: 'latest'
30+
- run: cd docs && mdbook build
31+
- name: upload dist
32+
uses: actions/upload-pages-artifact@v3
33+
with:
34+
path: docs/book/
35+
deploy:
36+
runs-on: ubuntu-latest
37+
# Add a dependency to the build job
38+
needs: build
39+
# Deploy to the github-pages environment
40+
environment:
41+
name: github-pages
42+
url: ${{ steps.deployment.outputs.page_url }}
43+
steps:
44+
- name: deploy to gh pages
45+
id: deployment
46+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)