Skip to content

ci: make forks build only and name checks clearly#14

Closed
Elvis020 wants to merge 1 commit into
devcongress:mainfrom
Elvis020:feature/fork-builds-no-deployments
Closed

ci: make forks build only and name checks clearly#14
Elvis020 wants to merge 1 commit into
devcongress:mainfrom
Elvis020:feature/fork-builds-no-deployments

Conversation

@Elvis020

@Elvis020 Elvis020 commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

Forks currently run the same main deployment workflows as devcongress/website.

Because forks do not have DevCongress deployment secrets or protected environments, their runs fail with deployment errors even though they should only be building the project.

This PR makes deployment ownership explicit and makes the check names match what each job actually does.

Behaviour after this PR

Activity devcongress/website Forks / fork-origin PRs
Install dependencies Yes Yes
Build Astro site Yes Yes
Upload Pages artifact Yes No
Workers dry-run validation Yes No
Enter protected deployment environment Yes No
Deploy GitHub Pages Yes No
Deploy Cloudflare Worker Yes No

What changes

Forks become build-only

  • Forks build the website only.
  • Fork-origin pull requests build the website only.
  • Only the canonical devcongress/website repository can validate or deploy GitHub Pages and Cloudflare.
  • Fork runs no longer enter protected deployment environments.

GitHub Pages ownership is isolated

  • Restricts the Pages artifact upload and deployment job to devcongress/website.
  • Moves Pages write and OIDC permissions from workflow-wide permissions to the deployment job only.
  • Keeps fork build jobs on read-only permissions.

Cloudflare Workers ownership is isolated

  • Restricts Wrangler dry-run validation to the canonical repository and non-fork PRs.
  • Restricts the production deployment job to devcongress/website on main.
  • Adds a deployment preflight so missing Cloudflare credentials report only:
Production deployment is not configured.
  • Hides raw Wrangler output for unexpected deployment failures and reports only:
Production deployment failed.

Workflow names are clearer

The GitHub checks now say exactly what each job is doing:

Workflow Job name
GitHub Pages Build static site
GitHub Pages Deploy GitHub Pages
Cloudflare Worker Build static site
Cloudflare Worker Deploy Cloudflare Worker

This avoids showing Build and Deploy beside jobs that are only building, or only deploying.

What this does not change

  • No public website content or UI.
  • No Cloudflare Worker configuration or domain routing.
  • No GitHub Pages or Cloudflare deployment behavior in the canonical repository when correctly configured.
  • No deployment secrets are added, changed, or exposed.

Verification

  • Confirmed both workflow files parse as valid YAML.
  • Confirmed the diff passes whitespace checks.
  • Confirmed the Cloudflare preflight emits a generic message when deployment credentials are missing.

@Elvis020 Elvis020 closed this Jul 12, 2026
@Elvis020 Elvis020 deleted the feature/fork-builds-no-deployments branch July 12, 2026 11:28
@Elvis020 Elvis020 changed the title ci: make forks build-only ci: make forks build only and name checks clearly Jul 12, 2026
@Elvis020 Elvis020 restored the feature/fork-builds-no-deployments branch July 12, 2026 11:29
@Elvis020 Elvis020 reopened this Jul 12, 2026
Restrict fork and fork-origin pull request runs to dependency installation and the Astro build, while keeping GitHub Pages and Cloudflare deployments owned by the canonical devcongress/website repository only.

Move Pages write and OIDC permissions onto the Pages deployment job, gate Pages artifact upload and deployment to the canonical repository, gate Cloudflare dry-run validation and production deployment to the canonical repository, and add generic Cloudflare deployment preflight/failure messages so fork logs do not expose raw Wrangler credential diagnostics.

Rename the workflow and job display names so build-only jobs appear as Build static site and production jobs appear as Deploy GitHub Pages or Deploy Cloudflare Worker instead of the misleading Build and Deploy wording.

Verification: both workflow files were parsed as valid YAML, the diff passed whitespace checks, and the missing-credential Cloudflare preflight path was exercised to confirm it emits the generic Production deployment is not configured message.
@Elvis020 Elvis020 force-pushed the feature/fork-builds-no-deployments branch from fc2141d to 9a96e87 Compare July 12, 2026 11:32
@Elvis020 Elvis020 closed this Jul 12, 2026
@Elvis020 Elvis020 reopened this Jul 12, 2026
@Elvis020 Elvis020 closed this Jul 12, 2026
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