Skip to content

ci: 添加PR部署工作流#829

Draft
lingbopro wants to merge 5 commits into
win12-online:mainfrom
lingbopro:branch_deploy_action
Draft

ci: 添加PR部署工作流#829
lingbopro wants to merge 5 commits into
win12-online:mainfrom
lingbopro:branch_deploy_action

Conversation

@lingbopro

Copy link
Copy Markdown
Member

参见 #793

我们在此issue提到可以用Actions来部署,因此本PR是一个简单的实现

(我也不知道能不能运行...)

另外,要使此Workflow正常工作,还需要设置仓库机密(见工作流文件)

(此PR借助通义灵码完成)

@lingbopro lingbopro requested a review from tangyuan0821 May 24, 2026 12:16
@lingbopro

lingbopro commented May 24, 2026

Copy link
Copy Markdown
Member Author

@tangyuan0821 为了使工作流能正常运行,请问可否为你的账户生成一个带有Pages读写权限的API令牌并将其置于仓库机密 CLOUDFLARE_API_TOKEN 中?谢谢

Comment thread .github/workflows/pr-deploy.yaml Outdated
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR似乎无法访问secrets捏,最好改用pull_request_target

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好像确实)

不过,pull_request_target在源仓库的主分支上运行,那还能实时预览执行效果嘛?

而且pull_request_target工作流不能直接checkout PR里的代码

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tangyuan0821

Copy link
Copy Markdown
Member

另外这么久了,tjy还没有给我们安装应用的权限嘛

@Iamliuxiaozhen

Copy link
Copy Markdown
Contributor

是不是又离线了(

Co-authored-by: Paper Moon <47830915@qq.com>
Comment thread .github/workflows/pr-deploy.yaml Outdated
Comment thread .github/workflows/pr-deploy.yaml Outdated
lingbopro and others added 2 commits June 7, 2026 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants