Files
xget/.github/workflows/workers.yml
T
xixu-me 98fa5e9d30 ci: add CI workflow and gate deployments on CI success
- Add ci.yml with lint, test, and typecheck jobs
- Update workers.yml to trigger on CI workflow completion
- Update sync.yml to trigger on CI workflow completion
- Update image.yml to trigger on CI workflow completion
- Fix pages-eo.yml secret name to match README (EDGEONE_PAGES_API_TOKEN)

Deployment workflows now only run after CI passes, preventing
broken code from being deployed to any platform.
2026-01-31 22:22:10 +08:00

33 lines
783 B
YAML

name: Deploy to Cloudflare Workers
on:
workflow_run:
workflows: ["CI"]
types:
- completed
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
deployments: write
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
steps:
- name: Checkout main branch
uses: actions/checkout@v6
- name: Deploy to Cloudflare Workers
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}