Tweak comment #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "******" |