Skip to content

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

Merged
Elvis020 merged 1 commit into
mainfrom
feature/fork-builds-no-deployments
Jul 14, 2026
Merged

ci: make forks build only and name checks clearly#16
Elvis020 merged 1 commit into
mainfrom
feature/fork-builds-no-deployments

Conversation

@Elvis020

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 changes.
  • No Cloudflare Worker configuration or domain-routing changes.
  • No change to the successful GitHub Pages or Cloudflare deployment targets in the canonical repository.
  • Deployment failures are now intentionally clearer: missing Cloudflare credentials and unexpected Wrangler failures emit generic messages.
  • No deployment secrets are added, changed, or exposed.

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 requested a review from bubunyo July 14, 2026 09:46
Comment thread .github/workflows/deploy-cloudflare-workers.yml
@Elvis020 Elvis020 merged commit 17adae7 into main Jul 14, 2026
8 checks passed
@Elvis020 Elvis020 deleted the feature/fork-builds-no-deployments branch July 14, 2026 10:12
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.

2 participants