|
|
name: Cloudfalre Worker Deploy |
|
|
on: |
|
|
push: |
|
|
branches: |
|
|
- master |
|
|
repository_dispatch: |
|
|
workflow_dispatch: |
|
|
|
|
|
jobs: |
|
|
deploy: |
|
|
runs-on: ubuntu-latest |
|
|
timeout-minutes: 60 |
|
|
steps: |
|
|
- name: Checkout |
|
|
uses: actions/checkout@v4.1.5 |
|
|
- name: Setup pnpm |
|
|
uses: pnpm/action-setup@v4.0.0 |
|
|
with: |
|
|
run_install: true |
|
|
version: 9 |
|
|
- name: build - 构建 |
|
|
run: pnpm run build-worker |
|
|
- name: Deploy to Cloudflare Workers with Wrangler |
|
|
uses: cloudflare/wrangler-action@v3.1.0 |
|
|
with: |
|
|
|
|
|
apiToken: ${{ secrets.CF_API_TOKEN }} |
|
|
|
|
|
accountId: ${{ secrets.CF_ACCOUNT_ID }} |
|
|
|
|
|
command: 'deploy --keep-vars' |
|
|
|