Skip to content

🟒 ci

🟒 ci #4

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy to Cloudflare Workers πŸ”₯
runs-on: ubuntu-latest
env:
OPENSTATUS_API_KEY: ${{ secrets.OPENSTATUS_API_KEY }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
- name: πŸ”₯ Install bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: πŸ“₯ Download deps
run: bun install
- name: πŸ”₯ Deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
packageManager: bun
command: deploy --minify src/index.ts
- name: πŸ§ͺ Test
run: bun test
id: test
- name: πŸš€ Rollback
if: failure() && steps.test.outcome == 'failure'
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: rollback
packageManager: bun