Skip to content

Add reusable release-notes preview workflow - #1421

Merged
cachafla merged 2 commits into
mainfrom
codex/reusable-release-preview
Jul 15, 2026
Merged

Add reusable release-notes preview workflow#1421
cachafla merged 2 commits into
mainfrom
codex/reusable-release-preview

Conversation

@cachafla

Copy link
Copy Markdown
Contributor

What and why?

Adds a documentation-owned release-notes preview workflow that can be invoked with an immutable validmind/release-notes commit. It validates the source PR, performs the targeted Quarto render, and deploys to a stable per-PR preview URL.

This replaces the temporary ref: edit and paired documentation preview PR lifecycle. A follow-up release-notes PR will dispatch this workflow and surface its result on the release-notes PR.

How to test

  • YAML parses locally.
  • The follow-up caller PR will be enabled after this workflow lands on documentation:main, then tested against an open release-notes PR.

What needs special review?

  • Cross-repository dispatch validation and approved branch prefixes.
  • Documentation-owned AWS and read-only source credentials remain in this repository.
  • Preview deployments are isolated under pr_previews/release-notes/pr-{number}.

Dependencies, breaking changes, and deployment notes

Merge this PR before enabling the caller workflow in validmind/release-notes. No production deployment behavior changes.

Release notes

N/A — internal CI workflow change.

Checklist

  • What and why
  • Screenshots or videos (Frontend)
  • How to test
  • What needs special review
  • Dependencies, breaking changes, and deployment notes
  • Labels applied
  • PR linked to Shortcut
  • Unit tests added (Backend)
  • Tested locally
  • Documentation updated (if required)

@cachafla cachafla added the internal Not to be externalized in the release notes label Jul 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR Summary

This PR introduces a new GitHub Actions workflow designed for previewing release notes. The workflow is triggered via both workflow_call and repository_dispatch events and accepts inputs such as a commit SHA, branch reference, PR number, and correlation ID. It performs several validations by comparing the provided inputs against the actual release-notes PR details retrieved via the GitHub API. For example, it checks that the commit SHA is valid, that the branch reference uses an approved prefix (either automated/* or codex/*), and that the PR number corresponds to an open PR from the expected repository.

After successful validation, the workflow proceeds to:

  • Check out the main repository and the release-notes repository (using sparse checkout to optimize performance).
  • Identify changed release directories by computing diffs between commits, which determines the target directories for the preview.
  • Verify copyright headers to ensure compliance.
  • Set up Quarto (using a pre-release version) and run a test merge for Quarto indexes.
  • Seed content from the staging environment through AWS S3 before rendering the target previews with Quarto.
  • Deploy the rendered preview to a dedicated S3 bucket path, invalidate the CloudFront cache to ensure updated content, and publish a summary that includes the preview URL.

Additionally, the PR removes a hardcoded branch reference from another workflow file, improving maintainability and ensuring that the docs site is validated against the current main branch of release notes.

Test Suggestions

  • Run the workflow with valid inputs and confirm that the preview URL is correctly generated and published.
  • Test the workflow with an invalid commit SHA or branch ref to ensure it fails early with appropriate error messages.
  • Simulate a PR that is either closed or not from the validmind/release-notes repository to verify that the validations prevent preview deployment.
  • Induce errors during the Quarto render step (such as forced warnings or errors) to check that the workflow correctly exits on render failures.
  • Verify that the AWS S3 synchronization and CloudFront invalidation steps work as expected by monitoring the deployed preview.

@github-actions

Copy link
Copy Markdown
Contributor

Validate docs site

✓ INFO: A live preview of the docs site is available — Open the preview

@github-actions

Copy link
Copy Markdown
Contributor

Lighthouse check results

✓ INFO: No site pages to audit in this PR.

Commit SHA: 1e4ef61

@cachafla
cachafla merged commit 8728011 into main Jul 15, 2026
6 checks passed
@cachafla
cachafla deleted the codex/reusable-release-preview branch July 15, 2026 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Not to be externalized in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant