-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Add GH workflow to build docs site and deploy to GH pages.
- Loading branch information
1 parent
a319816
commit 3ddc651
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: "deploy-github-pages" | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
|
||
permissions: {} | ||
|
||
concurrency: | ||
group: "${{github.workflow}}-${{github.ref}}" | ||
|
||
# Cancel in-progress jobs for efficiency | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: "actions/checkout@v4" | ||
- uses: "actions/setup-node@v4" | ||
with: | ||
node-version: "22" | ||
cache: "npm" | ||
cache-dependency-path: "./docs/package-lock.json" | ||
|
||
- run: "npm --prefix docs/ install" | ||
- run: "npm --prefix docs/ run build" | ||
|
||
- name: "Upload static files as artifact" | ||
uses: "actions/upload-pages-artifact@v4" | ||
with: | ||
path: "./docs/build" | ||
|
||
deploy: | ||
needs: "build" | ||
permissions: | ||
# To deploy to Pages | ||
pages: "write" | ||
|
||
# To request a JWT from GitHub for certifying the origin of the deployment | ||
id-token: "write" | ||
runs-on: "ubuntu-latest" | ||
environment: | ||
name: "github-pages" | ||
url: "${{steps.deployment.outputs.page_url}}" | ||
steps: | ||
- name: "Deploy to GitHub Pages" | ||
id: "deployment" | ||
uses: "actions/deploy-pages@v4" |