Skip to content

Only allow one build at once #13

Only allow one build at once

Only allow one build at once #13

on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
name: Deploy production to Cloudflare Pages & Migrate DB
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- run: npm install
- name: Build
run: npm run build
- name: Deploy to Cloudflare
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
wranglerVersion: "3.51.0"
packageManager: npm
command: pages deploy ./build/client --project-name=bithellstudios-telemetry-and-analytics --commit-dirty=true
postCommands: |
echo "*** Running D1 Migrations ***"
wrangler d1 migrations apply DB --remote
echo "******"