Skip to content

Deploy staging

Deploy staging #19

Workflow file for this run

name: Deploy staging
on:
workflow_dispatch:
jobs:
deploy_staging:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
cache: 'npm'
- run: sed -i "s|0.0.0|${GITHUB_REF}|" src/lib/version.ts
- run: sed -i "s|abcdef123456|${GITHUB_SHA}|" src/lib/version.ts
- run: npm ci
- run: npm install @angular/cli
- run: npx ng build
- run: cp _redirects dist/ctrl/_redirects
- uses: cloudflare/wrangler-action@v3
with:
wranglerVersion: '3'
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
# Use branch name to indicate Cloudflare environment: (main | staging)
# Cloudflare does not deploy by itself so the value is only used to
# determine the target environment according to defined rules.
command: pages deploy dist/ctrl --project-name=ctrl-app --branch=staging