Skip to content

Commit 12767a6

Browse files
committed
Add GitHub Actions workflow to deploy to GitHub Pages
1 parent 18db1a8 commit 12767a6

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
name: Build Docusaurus
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: 20
20+
cache: npm
21+
- name: Install dependencies
22+
run: npm ci
23+
- name: Build website
24+
run: npm run build
25+
- name: Upload Build Artifact
26+
uses: actions/upload-pages-artifact@v3
27+
with:
28+
path: build
29+
30+
deploy:
31+
name: Deploy to GitHub Pages
32+
needs: build
33+
34+
permissions:
35+
pages: write
36+
id-token: write
37+
38+
environment:
39+
name: github-pages
40+
url: ${{ steps.deployment.outputs.page_url }}
41+
42+
runs-on: ubuntu-latest
43+
steps:
44+
- name: Deploy to GitHub Pages
45+
id: deployment
46+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)