44 lines
1.3 KiB
YAML
44 lines
1.3 KiB
YAML
name: Deploy to Cloudflare Pages
|
|
|
|
# aimighty/aimighty-market (Gitea, org aimighty) is the canonical source for
|
|
# aimighty-market.pages.dev since 2026-10-13 — migrated from GitHub
|
|
# (bayerhazard/aimighty-market is retired/archived). Every push to main
|
|
# deploys automatically via the Gitea runner; CANONICAL_EPOCH_MS must be
|
|
# bumped in the same commit whenever the catalog changes.
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: npm
|
|
|
|
- run: npm ci
|
|
|
|
- name: Deploy to Cloudflare Pages
|
|
run: |
|
|
for i in $(seq 1 30); do
|
|
echo "wrangler deploy attempt $i/30"
|
|
if npx wrangler pages deploy functions --project-name=aimighty-market; then
|
|
echo "deployed on attempt $i"
|
|
exit 0
|
|
fi
|
|
echo "attempt $i failed; retrying in 180s"
|
|
sleep 180
|
|
done
|
|
echo "all deploy attempts failed"
|
|
exit 1
|
|
env:
|
|
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|