Skip to content

Commit 0aa5c9a

Browse files
committed
Add Docusaurus deployment workflow
1 parent a685c94 commit 0aa5c9a

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
# Review gh actions docs if you want to further define triggers, paths, etc
8+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
9+
paths:
10+
- "docs/**"
11+
- ".github/workflows/deploy-docs.yml"
12+
13+
jobs:
14+
build:
15+
name: Build Docusaurus
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version: 20
24+
cache: npm
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
working-directory: docs
29+
30+
- name: Build website
31+
run: npm run build
32+
working-directory: docs
33+
34+
- name: Upload Build Artifact
35+
uses: actions/upload-pages-artifact@v3
36+
with:
37+
path: docs/build
38+
39+
deploy:
40+
name: Deploy to GitHub Pages
41+
needs: build
42+
43+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
44+
permissions:
45+
pages: write # to deploy to Pages
46+
id-token: write # to verify the deployment originates from an appropriate source
47+
48+
# Deploy to the github-pages environment
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}
52+
53+
runs-on: ubuntu-latest
54+
steps:
55+
- name: Deploy to GitHub Pages
56+
id: deployment
57+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)