Files
blackroad-private-enhancements/.github/workflows/cloudflare-deploy.yml
blackboxprogramming 4acdf1f8ac
Some checks failed
☁️ Cloudflare Deployment / Deploy Workers (push) Has been cancelled
🚂 Railway Deployment / Deploy to Railway (push) Has been cancelled
🌐 Unified Multi-Platform Deployment / 🔍 Prepare (push) Has been cancelled
▲ Vercel Deployment / Deploy to Vercel (push) Has been cancelled
🌐 Unified Multi-Platform Deployment / 🚀 Deploy all platforms (push) Has been cancelled
🔒 Security Scanning / 📦 Dependencies (push) Failing after 40s
🔒 Security Scanning / 🔐 Secrets (push) Failing after 1m34s
💾 Automated Backup / 📦 Backup infrastructure (push) Failing after 45s
🏥 Infrastructure Health Monitoring / 🔍 Health Check (push) Successful in 2s
Initial commit — RoadCode import
2026-03-08 20:04:29 -05:00

51 lines
1.4 KiB
YAML

name: ☁️ Cloudflare Deployment
on:
push:
branches: [main, develop]
paths: ['src/**', 'workers/**', 'wrangler.toml']
pull_request:
branches: [main]
workflow_dispatch:
jobs:
deploy-workers:
name: Deploy Workers
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout
uses: actions/checkout@v4
- name: 🔧 Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: 📦 Install
run: npm ci
- name: 🏗️ Build
run: npm run build --if-present
- name: 🚀 Deploy Workers
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: deploy --env production
- name: 🧹 Purge cache
if: github.ref == 'refs/heads/main'
run: |
curl -X POST "https://api.cloudflare.com/client/v4/zones/${{ secrets.CLOUDFLARE_ZONE_ID }}/purge_cache" \
-H "Authorization: Bearer ${{ secrets.CLOUDFLARE_API_TOKEN }}" \
-H "Content-Type: application/json" \
--data '{"purge_everything":true}'
- name: 📊 Summary
run: |
echo "### ☁️ Cloudflare Deployment Success" >> $GITHUB_STEP_SUMMARY
echo "- **Worker**: blackroad-private" >> $GITHUB_STEP_SUMMARY