Skip to content

Publish locked Netlify production deploys after CI#99

Merged
john-kurkowski merged 4 commits into
masterfrom
codex/locked-netlify-publish
Jul 6, 2026
Merged

Publish locked Netlify production deploys after CI#99
john-kurkowski merged 4 commits into
masterfrom
codex/locked-netlify-publish

Conversation

@john-kurkowski

@john-kurkowski john-kurkowski commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Context

Production deploys currently come from GitHub Actions building the site and uploading dist directly to Netlify. Netlify also observes master. This creates duplicate production deploy records and means the live artifact is built outside Netlify’s production build path.

This patch changes the deployment model: Netlify owns all builds, including production, and GitHub Actions owns the production publish gate. Netlify auto publishing becomes locked, so production deploys can be built but do not go live until CI passes and GHA explicitly publishes the Netlify deploy for the same commit SHA.

Changes

  • Re-enable Netlify production builds by removing the production ignore rule from netlify.toml.
  • Replace the production artifact upload step in GitHub Actions with a publish step.
  • Add src/scripts/publish-netlify-production-deploy.ts to:
    • poll Netlify production deploys for the current GITHUB_SHA
    • require the matching deploy to be for master and production
    • wait for in-progress deploys to become ready
    • fail on skipped, errored, unsupported, or missing deploys
    • publish the exact matching deploy via Netlify’s restore endpoint
  • Add tsx as a direct dev dependency for running the TypeScript script in CI.
  • Add tests for matching, publishing, waiting, failure, skipped deploys, and timeout behavior.

Test Plan

  1. Open a PR from a non-master branch and confirm Netlify still creates a normal Deploy Preview.
  2. Push or merge a commit to master and confirm Netlify creates a production deploy but does not publish it automatically while auto publishing is locked.
  3. Confirm the GitHub Actions production deploy job waits for the Netlify deploy for the same commit SHA, then publishes that deploy after the required checks pass.
  4. In Netlify’s deploy list, confirm the published production deploy corresponds to the same commit that passed GitHub Actions.
  5. Confirm future production deploys remain locked until GitHub Actions publishes them; do not unlock Netlify auto publishing.

Let Netlify build production deploys and have GitHub Actions publish the matching deploy only after CI passes.
@argos-ci

argos-ci Bot commented Jun 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Jul 6, 2026, 3:45 AM

Record the locked auto-publishing invariant and explain why GitHub Actions publishes Netlify-built production deploys.
@john-kurkowski john-kurkowski marked this pull request as ready for review July 6, 2026 03:44
@john-kurkowski john-kurkowski merged commit 31ea85c into master Jul 6, 2026
14 checks passed
@john-kurkowski john-kurkowski deleted the codex/locked-netlify-publish branch July 6, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant