Enhance GitHub workflows: add production deployment configuration and target 'canary' branch for pull requests.

This commit is contained in:
Mauricio Siu
2025-11-28 01:46:41 -06:00
parent c697f54b53
commit b56d2b6d8c
2 changed files with 3 additions and 0 deletions

47
.github/workflows/deploy-production.yml vendored Normal file
View File

@@ -0,0 +1,47 @@
name: Deploy to Cloudflare Pages (Production)
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Publish to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install dependencies
working-directory: app
run: pnpm install
- name: Build
working-directory: app
run: pnpm build
- name: Publish to Cloudflare Pages
uses: AdrianGonz97/refined-cf-pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
directory: app/dist
deploymentName: Production
branch: main
wranglerVersion: '3'