mirror of
https://github.com/theodore-song/polymarket-analyst.git
synced 2026-08-24 13:08:10 +00:00
52 lines
1.9 KiB
YAML
52 lines
1.9 KiB
YAML
name: Release duration-aware protected returns after Vercel quota reset
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "25 1-23/2 23 8 *"
|
|
- cron: "25 1-13/2 24 8 *"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
concurrency:
|
|
group: release-protected-routing
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 35
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: main
|
|
fetch-depth: 0
|
|
- name: Trigger the deferred production deployment
|
|
env:
|
|
ARENA_URL: https://polymarket-site-eta.vercel.app
|
|
run: |
|
|
if curl --fail --silent --show-error "${ARENA_URL}/?duration_preflight=${GITHUB_RUN_ID}" | grep -q 'bundleMinimumDailyReturn'; then
|
|
echo "Duration-aware protected returns are already live."
|
|
exit 0
|
|
fi
|
|
printf 'Duration-aware protected return deployment retry from run %s at %s\n' "$GITHUB_RUN_ID" "$(date -u +%FT%TZ)" > .duration-aware-release-trigger
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git add .duration-aware-release-trigger
|
|
git commit -m "Retry duration-aware protected returns deployment"
|
|
git push origin HEAD:main
|
|
- name: Verify the exact sizing revision in production
|
|
env:
|
|
ARENA_URL: https://polymarket-site-eta.vercel.app
|
|
run: |
|
|
for attempt in $(seq 1 40); do
|
|
if curl --fail --silent --show-error "${ARENA_URL}/?duration_wait=${GITHUB_RUN_ID}-${attempt}" | grep -q 'bundleMinimumDailyReturn'; then
|
|
echo "Duration-aware protected returns are live."
|
|
exit 0
|
|
fi
|
|
sleep 30
|
|
done
|
|
echo "The Vercel quota has not admitted this revision yet; a later scheduled retry will continue."
|
|
exit 1
|