Name change to kick cloudflare cache #287
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |