Skip to content

I'm getting angry

I'm getting angry #56

name: Deploy Prod
on:
push:
branches:
- master
env:
WORKER_ENV: prod
RUN: ${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}
jobs:
deploy:
runs-on: ubuntu-latest
name: Test & Deploy Prod
environment: prod
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
# Run Pre-Deploy
- name: Install dependencies
run: npm ci
- name: Run pre-deploy
run: npm run pre-deploy
# Build the site
- name: Run site npm install
working-directory: site
run: npm ci
- name: Run site build
working-directory: site
run: npm run build
# Run TypeScript error checking and tests
- name: Run TypeScript error checking
run: npm run ts-errcheck
- name: Run tests
run: npm test
# Deploy to Cloudflare
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{secrets.CLOUDFLARE_API_TOKEN}}
environment: ${{env.WORKER_ENV}}