Files
massgrave.dev/.github/workflows/deploy.yml
T

63 lines
1.2 KiB
YAML

name: Deploy to GitHub Pages
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build:
name: Build Docusaurus
runs-on: ubuntu-latest
concurrency:
group: github-pages
cancel-in-progress: true
permissions:
contents: read
steps:
- uses: actions/[email protected]
with:
fetch-depth: 1 # We will need to switch this back to 0 if we ever need to use lastUpdated in Docusaurus
- uses: actions/[email protected]
with:
node-version: 24
cache: npm
- name: Install dependencies
run: npm ci
- name: Build website
run: npm run build
- name: Upload Build Artifact
uses: actions/[email protected]
with:
path: build
deploy:
name: Deploy to GitHub Pages
needs: build
concurrency:
group: github-pages
cancel-in-progress: false # deploy-pages seems to not be fully atomic
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/[email protected]