ci(.github/workflows/ci-cd.yaml): 添加条件判断以限制部署到Cloudflare
This commit is contained in:
1
.github/workflows/ci-cd.yaml
vendored
1
.github/workflows/ci-cd.yaml
vendored
@@ -45,6 +45,7 @@ jobs:
|
|||||||
run: pnpm run type-check # 要先 build,保证 components.d.ts 存在
|
run: pnpm run type-check # 要先 build,保证 components.d.ts 存在
|
||||||
|
|
||||||
- name: 🚀 部署到 Cloudflare
|
- name: 🚀 部署到 Cloudflare
|
||||||
|
if: github.ref == 'refs/heads/main'
|
||||||
uses: cloudflare/wrangler-action@v3
|
uses: cloudflare/wrangler-action@v3
|
||||||
with:
|
with:
|
||||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
|
Reference in New Issue
Block a user