Deploy to Pre #122
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 to Pre | |
on: | |
workflow_dispatch: | |
env: | |
KV_LOCAL_ID: ${{ secrets.KV_LOCAL_ID }} | |
KV_PROD_ID: ${{ secrets.KV_PROD_ID }} | |
QUEUE_NAME_LOCAL: ${{ secrets.QUEUE_NAME_LOCAL }} | |
QUEUE_NAME_PROD: ${{ secrets.QUEUE_NAME_PROD }} | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
environment: pre | |
name: Test & Deploy | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js 20.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
- name: Test | |
run: | | |
yarn | |
yarn run build | |
yarn run test | |
- name: Deploy to Pre | |
uses: cloudflare/wrangler-action@v3 | |
with: | |
apiToken: ${{ secrets.CF_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
preCommands: yarn build | |
command: deploy |