66 lines
1.8 KiB
YAML
66 lines
1.8 KiB
YAML
name: Deploy Workers
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'cypher-executor/**'
|
|
- 'registry/**'
|
|
- 'credentials/**'
|
|
workflow_dispatch: # 允許手動觸發,部署全部三個
|
|
|
|
jobs:
|
|
deploy-cypher-executor:
|
|
name: Deploy cypher-executor
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
- name: Install deps
|
|
working-directory: cypher-executor
|
|
run: npm install --legacy-peer-deps
|
|
- name: Deploy
|
|
working-directory: cypher-executor
|
|
run: npx wrangler deploy
|
|
env:
|
|
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
|
|
deploy-registry:
|
|
name: Deploy registry
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
- name: Install deps
|
|
working-directory: registry
|
|
run: npm install --legacy-peer-deps
|
|
- name: Deploy
|
|
working-directory: registry
|
|
run: npx wrangler deploy
|
|
env:
|
|
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
|
|
deploy-credentials:
|
|
name: Deploy credentials
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
- name: Install deps
|
|
working-directory: credentials
|
|
run: npm install --legacy-peer-deps
|
|
- name: Deploy
|
|
working-directory: credentials
|
|
run: npx wrangler deploy
|
|
env:
|
|
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|