Skip to content

deploy: https git pin + latest software SHA (prepare-build fix) #4

deploy: https git pin + latest software SHA (prepare-build fix)

deploy: https git pin + latest software SHA (prepare-build fix) #4

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 }}