Skip to content

ci(release): adding environment name explicitly #24

ci(release): adding environment name explicitly

ci(release): adding environment name explicitly #24

name: Deploy Angular Examples (Staging)
permissions:
contents: read
on:
push:
branches:
- staging
paths:
- 'angular-examples/**'
workflow_dispatch: {}
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy Angular Examples (Staging)
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v6
with:
version: 9
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '24'
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- name: Install Dependencies
run: pnpm install --frozen-lockfile
working-directory: ./
- name: Build
run: pnpm run build --env staging
working-directory: ./angular-examples
env:
CLOUDFLARE_ENV: staging # for vite.config.ts to figure out which environment to build for
VITE_ENV: staging
VITE_BASE_URL: staging.realtime.cloudflare.com
- name: Deploy to Cloudflare Workers
uses: cloudflare/wrangler-action@v4
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: deploy --env staging
workingDirectory: ./angular-examples
env:
CLOUDFLARE_ENV: staging # for vite.config.ts to figure out which environment to deploy to
VITE_ENV: staging