Skip to content

Deploy to staging (Github pages) #13

Deploy to staging (Github pages)

Deploy to staging (Github pages) #13

name: Deploy to staging (Github pages)
on:
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
name: Build site
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Node
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 24
cache: npm
cache-dependency-path: website/package-lock.json
- name: Install dependencies
run: |
cd website
npm ci
- name: Build Docusaurus site
env:
DEPLOY_TARGET: gh
run: |
cd website
npm run build
- name: Upload build artifact
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: docusaurus-build
path: website/build
include-hidden-files: true
deploy:
name: Deploy to GitHub Pages
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
steps:
- name: Download build artifact
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: docusaurus-build
path: build
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: build
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0