mirror of
https://github.com/ZSCGR/CloudFlare-ImgBed.git
synced 2026-08-13 04:03:42 +08:00
feat: auto-deploy Workers on main branch push
- Add push trigger on main branch (works with sync.yml) - Skip deployment on original repo and forks without secrets
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
name: Deploy to Cloudflare Workers
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
worker_name:
|
||||
@@ -28,6 +31,9 @@ on:
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
# 仅在 fork 仓库且配置了 Cloudflare secrets 时运行
|
||||
# 原仓库 push 和未配置 secrets 的 fork 不会触发部署
|
||||
if: ${{ github.repository != 'MarSeventh/CloudFlare-ImgBed' && secrets.CLOUDFLARE_API_TOKEN != '' }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
Reference in New Issue
Block a user