Skip to content

deploy: pin 8440275 (prepare-free, dist ships) #7

deploy: pin 8440275 (prepare-free, dist ships)

deploy: pin 8440275 (prepare-free, dist ships) #7

Workflow file for this run

name: deploy
on:
push:
branches: [main]
tags: ["v*"]
jobs:
deploy-staging:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: "22" }
- run: npm install
# Staging only: the workers.dev preview URL, never the production
# route. Production flips exclusively via a v* tag.
- run: npx wrangler versions upload --name interscript-api-staging
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
deploy-production:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: "22" }
- run: npm install
- run: npx wrangler deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}