Skip to content

Scope Netlify deploy previews to license-exceptions folder via GitHub Actions#1369

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/scope-netlify-action-license-exceptions
Draft

Scope Netlify deploy previews to license-exceptions folder via GitHub Actions#1369
Copilot wants to merge 2 commits intomainfrom
copilot/scope-netlify-action-license-exceptions

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 8, 2026

Netlify was triggering deploy previews on every PR regardless of what changed. The previous fix (ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF -- ." in netlify.toml) was unreliable — it cancelled builds after they started rather than preventing them.

Changes

  • .github/workflows/netlify-preview.yml — New workflow scoped to license-exceptions/** changes via pull_request: paths filtering. Builds and deploys a Netlify preview using npx netlify-cli with NETLIFY_SITE_ID/NETLIFY_AUTH_TOKEN secrets, then posts the preview URL as a PR comment. User-controlled inputs (PR title/number) are passed via env vars to avoid shell injection.

  • netlify.toml — Removes the unreliable git diff ignore from [build]. Adds [context.deploy-preview] ignore = "exit 0" to unconditionally skip Netlify GitHub App PR builds — preview deployments are now owned entirely by the GitHub Actions workflow above.

on:
  pull_request:
    paths:
      - "license-exceptions/**"

Note: NETLIFY_SITE_ID and NETLIFY_AUTH_TOKEN must be configured in repository Actions secrets for the deploy step to function.

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 8, 2026

Deploy Preview for cncf-license-exceptions canceled.

Name Link
🔨 Latest commit a7c9164
🔍 Latest deploy log https://app.netlify.com/projects/cncf-license-exceptions/deploys/69d6d58beb03ad0008f5e936

Copilot AI changed the title [WIP] Scope Netlify action for license exceptions site to license-exceptions folder Scope Netlify deploy previews to license-exceptions folder via GitHub Actions Apr 8, 2026
Copilot finished work on behalf of krook April 8, 2026 22:25
Copilot AI requested a review from krook April 8, 2026 22:25
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.

Need to scope the Netlify action for the license exceptions site to the "license-exceptions" folder

2 participants