Skip to content

2.1.4

2.1.4 #4

Workflow file for this run

name: Release to Production
on:
push:
tags:
- 'v*' # triggers on v2.1.0, v2.2.0, etc.
jobs:
deploy-worker-production:
runs-on: ubuntu-latest
name: Deploy Worker (production)
steps:
- uses: actions/checkout@v4
with:
# Fetch full history so we can resolve which branch the tag is on
fetch-depth: 0
# Check out master explicitly — tag pushes otherwise leave the
# repo in detached HEAD, which Cloudflare Pages sees as "HEAD"
# instead of "master" and fails the production branch check.
ref: master
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install worker deps
working-directory: worker
run: npm install
- name: Type-check worker
working-directory: worker
run: npm run type-check
- name: Deploy Worker
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: worker
command: deploy # default env = production
deploy-frontend-production:
runs-on: ubuntu-latest
name: Deploy Frontend (production)
needs: deploy-worker-production
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: master
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install frontend deps
run: npm install
- name: Type-check frontend
run: npm run type-check
- name: Build frontend
run: npm run build
env:
VITE_API_URL: ${{ secrets.VITE_API_URL }}
- name: Deploy to Cloudflare Pages (production)
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy dist --project-name=vibecoded-stocard --branch=master
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true