Skip to content

Merge pull request #5 from kubo6472/vite-rewrite #4

Merge pull request #5 from kubo6472/vite-rewrite

Merge pull request #5 from kubo6472/vite-rewrite #4

Workflow file for this run

name: Deploy
on:
push:
branches:
- master
- vite-rewrite
workflow_dispatch:
jobs:
deploy-worker:
runs-on: ubuntu-latest
name: Deploy Worker
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: worker/package-lock.json
- name: Install worker deps
working-directory: worker
run: npm ci
- name: Type-check worker
working-directory: worker
run: npm run type-check
- name: Deploy Cardex API Worker
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: worker
command: deploy
deploy-pages:
runs-on: ubuntu-latest
name: Deploy Frontend
needs: deploy-worker
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: package-lock.json
- name: Install frontend deps
run: npm ci
- 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
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy dist --project-name=vibecoded-stocard