Skip to content

Name change to kick cloudflare cache #287

Name change to kick cloudflare cache

Name change to kick cloudflare cache #287

name: Deploy staging
on:
pull_request_target:
branches:
- main
jobs:
deploy_staging:
runs-on: ubuntu-latest
environment: staging
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-node@v3
with:
cache: 'npm'
- run: npm ci
- run: npm run build
- run: cp _redirects build/_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 build --project-name=website --branch=staging