Skip to content

Deploy — GitHub Pages

Builds a static site and deploys it to GitHub Pages via the official actions/deploy-pages.

Usage

yaml
jobs:
  pages:
    uses: KevinDeBenedetti/github-workflows/.github/workflows/deploy-pages.yml@main
    with:
      build-command: 'pnpm build'
      output-directory: dist

Inputs

InputTypeDefaultDescription
working-directorystring'.'Path to the app root (e.g. apps/client)
node-versionstring'20'Node.js version
build-commandstringpnpm buildCommand to build the static site
output-directorystringdistBuild output directory, relative to working-directory

Outputs

OutputDescription
page-urlURL of the deployed GitHub Pages site

Notes

  • Requires GitHub Pages to be enabled in repository settings (source: GitHub Actions).
  • The deploy job requires pages: write and id-token: write permissions (automatically granted).
  • Uses actions/upload-pages-artifact + actions/deploy-pages for the two-stage build → deploy split.