Skip to content

Add GitHub Action for automated Cloudflare Pages deployment#35

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/add-github-action-for-deploys
Draft

Add GitHub Action for automated Cloudflare Pages deployment#35
Copilot wants to merge 2 commits into
mainfrom
copilot/add-github-action-for-deploys

Conversation

Copilot AI commented Dec 4, 2025

Copy link
Copy Markdown

Automates frontend deployment to Cloudflare Pages on merge to main, eliminating manual npm run build && wrangler pages deploy steps.

Changes

  • .github/workflows/deploy.yml - Workflow triggers on main branch push, builds with npm ci && npm run build, deploys via cloudflare/wrangler-action@v3
  • DEPLOYMENT.md - Setup instructions for required GitHub secrets: CLOUDFLARE_API_TOKEN (API token with Pages edit permissions) and CLOUDFLARE_ACCOUNT_ID
  • README.md - Added deployment section linking to setup docs

Setup Required

Add two repository secrets in GitHub Settings → Secrets and variables → Actions:

  1. CLOUDFLARE_API_TOKEN - Create in Cloudflare Dashboard → API Tokens with "Edit Cloudflare Workers" template
  2. CLOUDFLARE_ACCOUNT_ID - Found in Cloudflare Dashboard sidebar

See DEPLOYMENT.md for detailed steps.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/cloudflare/wrangler-action/releases
    • Triggering command: /usr/bin/curl curl -s REDACTED (http block)
  • https://api.github.com/repos/cloudflare/wrangler-action/releases/latest
    • Triggering command: /usr/bin/curl curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Add github action for live site updates</issue_title>
<issue_description>Would be nice if we could have a gh action to do the deploy when new things are merged into main.

Right now I manually do

npm run build
wrangler pages deploy dist --project-name qp --branch main

Would require auth via gh secret

Originally posted by @magland in #31 (comment)
</issue_description>

<agent_instructions>And provide instructions on what gh secret to add etc</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: yarikoptic <39889+yarikoptic@users.noreply.github.com>
Copilot AI changed the title [WIP] Add GitHub action for live site updates Add GitHub Action for automated Cloudflare Pages deployment Dec 4, 2025
Copilot AI requested a review from yarikoptic December 4, 2025 22:47
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.

Add github action for live site updates

2 participants