Skip to content

Quarto Preview Deploy #504

Quarto Preview Deploy

Quarto Preview Deploy #504

# Deploy half of the PR-preview family, delegated to the reusable workflow in
# d-morrison/gha. Triggered when the build workflow finishes, it downloads the
# build artifact and publishes the preview to gh-pages. This runs in the
# BASE-repo context, so its token can write — keeping it separate from the
# read-only build half is the trust boundary.
#
# NOTE: the `workflows:` value below MUST match the `name:` of the build
# workflow (preview.yml). `workflow_run` triggers only fire when this file
# lives on the default branch. The reusable workflow sets its own per-PR
# deploy concurrency, so none is needed here.
name: Quarto Preview Deploy
on:
workflow_run:
workflows: ["Quarto Preview Build"]
types: [completed]
jobs:
deploy:
permissions:
contents: write # push to gh-pages
pull-requests: write # post the preview-link comment
actions: read # download the build artifact
uses: d-morrison/gha/.github/workflows/preview-deploy.yml@v2