ci: Inline Cloudflare Pages project name - #28
Merged
Conversation
Replace vars.CLOUDFLARE_PROJECT_NAME with the literal project name the workflow already deploys to. The variable was scoped to a single environment, so it silently resolves to empty in any other environment. Matches facioquo/schemas deploy.yml.
|
|
Select the environment from github.ref rather than the event type, so a workflow_dispatch off a feature branch resolves to preview instead of production. Production is only reached from the default branch.
Deploying stock-indicators with
|
| Latest commit: |
20e4c4f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://839b4590.stock-indicators.pages.dev |
| Branch Preview URL: | https://ci-inline-cloudflare-project.stock-indicators.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Org-wide consistency cleanup: retire
vars.CLOUDFLARE_PROJECT_NAMEin favour of the literal project name, matching facioquo/schemasdeploy.yml(--project-name=schemas).Why: the variable was defined only at environment scope, so it resolves to an empty string in any job that runs under a different environment — and an empty
--project-namefails at deploy time rather than at lint time. Two sibling repos hit exactly this while adding PR preview deployments. The value is a stable, non-secret identifier, so the indirection buys nothing.No change to what gets deployed or where — the inlined value is the same one the environment variable already supplied.
Follow-up
Once this merges, the now-unused
CLOUDFLARE_PROJECT_NAMEvariable can be deleted from this repo's environment settings. It has no other references in the repo.