Skip to content

fix redirect

fix redirect #2

Workflow file for this run

name: Deploy to Cloudflare Pages
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js (if needed for future enhancements)
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Validate PWA files
run: |
echo "Checking required PWA files..."
test -f main.html || (echo "main.html not found" && exit 1)
test -f manifest.json || (echo "manifest.json not found" && exit 1)
test -f sw.js || (echo "sw.js not found" && exit 1)
test -f icon-192.svg || (echo "icon-192.svg not found" && exit 1)
test -f icon-512.svg || (echo "icon-512.svg not found" && exit 1)
echo "All PWA files found ✓"
- name: Deploy to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: pose-estimator-pwa
directory: ./
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
- name: Deployment Success Notification
if: success()
run: |
echo "🎉 PWA successfully deployed to Cloudflare Pages!"
echo "Your app should be available at: https://pose-estimator-pwa.pages.dev"
- name: Deployment Failure Notification
if: failure()
run: |
echo "❌ Deployment failed. Please check the logs above."
echo "Common issues:"
echo "1. Missing CLOUDFLARE_API_TOKEN secret"
echo "2. Missing CLOUDFLARE_ACCOUNT_ID secret"
echo "3. Incorrect project name"
echo "4. Missing required PWA files"