Skip to content

up

up #12

Workflow file for this run

name: Deploy GitHub Pages
on:
push:
branches: [main]
paths: ["web/**", "packages/shared/**", "pnpm-lock.yaml", "pnpm-workspace.yaml", ".github/workflows/deploy-pages.yml"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 11.9.0
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm --filter @wq-calendar/web build
env:
VITE_API_BASE_URL: ${{ vars.VITE_API_BASE_URL }}
VITE_TURNSTILE_SITE_KEY: ${{ vars.VITE_TURNSTILE_SITE_KEY }}
VITE_BASE_PATH: ${{ vars.VITE_BASE_PATH }}
- name: Wait for replay API rollout
if: ${{ vars.VITE_API_BASE_URL != '' }}
env:
API_BASE_URL: ${{ vars.VITE_API_BASE_URL }}
run: |
for attempt in $(seq 1 60); do
if curl --fail --silent --show-error "$API_BASE_URL/health" | jq --exit-status '.features | index("replays-v1")' >/dev/null; then
echo "Replay API is ready."
exit 0
fi
echo "Waiting for Worker migration and deployment ($attempt/60)..."
sleep 10
done
echo "Replay API did not become ready; keeping the current Pages deployment."
exit 1
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v4
with:
path: web/dist
- id: deployment
uses: actions/deploy-pages@v4