Merge pull request #743 from cloudflare/brytonh/1273 #670
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 | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Navigate to repo | |
run: cd $GITHUB_WORKSPACE | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: '19.x' | |
- name: Install deps | |
run: npm ci | |
- name: Build site | |
run: npm run build | |
- name: Build Workers script | |
run: npm run build-worker | |
env: | |
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} | |
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} | |
- name: Wrangler auth check | |
run: npm run wrangler-whoami | |
env: | |
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} | |
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} | |
- name: Upload assets | |
run: npm run deploy-worker | |
env: | |
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} | |
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} |