1. wrangler version upgrade to v3 #9
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: Publish Workers to Cloudflare | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v3 | |
- name: Setup nodejs env | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
# - name: Setup cache conf | |
# uses: actions/cache@v3 | |
# with: | |
# # path: ~/.npm | |
# path: '**/node_modules' | |
# key: ${{ runner.os }}-modules-${{ hashFiles('**/package.json') }} | |
- name: Deploy workers | |
uses: cloudflare/wrangler-action@v3 | |
env: | |
USER: root | |
with: | |
apiToken: ${{ secrets.CF_API_TOKEN }} | |
# accountId: ${{ secrets.CF_ACCOUNT_ID }} | |
preCommands: echo "*** publish start ***" | |
postCommands: | | |
echo "*** publish complete ***" | |
# command: whoami | |
environment: 'production' |