Deploy to Pre #68
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: | |
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }} | |
KV_LOCAL_ID: ${{ secrets.KV_LOCAL_ID }} | |
KV_PROD_ID: ${{ secrets.KV_PROD_ID }} | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
environment: pre | |
name: Test & Deploy | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Test | |
run: | | |
yarn | |
yarn run build | |
yarn run test | |
- name: Deploy to Pre | |
uses: cloudflare/[email protected] | |
with: | |
apiToken: ${{ secrets.CF_API_TOKEN }} | |
preCommands: yarn build | |
command: publish | |
env: | |
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} |