Skip to content

Commit 81f9924

Browse files
author
liangweifeng
committed
fix: 限制 GitHub Pages 部署仅在 master/main 分支执行
- 添加条件判断:deploy job 仅在 master 或 main 分支运行 - dev 分支只执行构建验证,不部署到 GitHub Pages - 解决 dev 分支环境保护规则冲突问题
1 parent 77a44d1 commit 81f9924

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848
path: docs/.vitepress/dist
4949

5050
deploy:
51+
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
5152
needs: build
5253
runs-on: ubuntu-latest
5354
environment:

0 commit comments

Comments
 (0)