Skip to content

Build and deploy site #41

Build and deploy site

Build and deploy site #41

Workflow file for this run

name: Build and deploy site
on:
# Chain after marketplace build completes
workflow_run:
workflows: ["Build marketplace.json"]
types: [completed]
# Also trigger on site-only changes
push:
branches: [main]
paths:
- 'site/**'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
# Skip if triggered by workflow_run that failed
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v4
with:
# Ensure we get the latest commit (including the marketplace rebuild commit)
ref: main
- uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm
cache-dependency-path: site/pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --frozen-lockfile
working-directory: site
- name: Build site
run: pnpm build
working-directory: site
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: site/dist
deploy:
needs: build
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