Skip to content

Commit 177c2f4

Browse files
author
Chu Fan
committed
feat: update ci rule
1 parent 3bb760d commit 177c2f4

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

.github/workflows/deploy-esc.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Deploy-ESC
33

44
on:
55
push: # 推送的时候触发
6-
# branches: [ "master" ] # 推送的分支
6+
branches: [ "master" ] # 推送的分支
77
# Publish semver tags as releases.
88
# tags: [ 'v*.*.*' ]
99
# 手动触发部署
@@ -21,6 +21,7 @@ jobs:
2121
Deploy-ESC:
2222
name: "部署到ESC"
2323
runs-on: ubuntu-latest
24+
if: github.repository == "142vip/JavaScriptCollection"
2425
permissions:
2526
contents: read
2627
packages: write

.github/workflows/docker-image.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ name: Docker-Image
33

44
on:
55
push: # 推送的时候触发
6-
# branches: [ "master" ] # 推送的分支
7-
# Publish semver tags as releases.
8-
# tags: [ 'v*.*.*' ]
6+
branches: [ "master" , "next" ] # 推送的分支
7+
# Publish semver tags as releases.
8+
# tags: [ 'v*.*.*' ]
99
# 手动触发部署
1010
workflow_dispatch:
11-
# pull_request:
12-
# branches: [ "next" ]
11+
pull_request:
12+
branches: [ "master" , "next" ]
1313

1414
env:
1515
# 仓库地址
@@ -21,6 +21,7 @@ jobs:
2121
Docker-Image:
2222
name: "构建Docker镜像"
2323
runs-on: ubuntu-latest
24+
if: github.repository == "142vip/JavaScriptCollection"
2425
permissions:
2526
contents: read
2627
packages: write
@@ -34,16 +35,14 @@ jobs:
3435

3536
- name: Login Docker
3637
run: |
37-
docker version;
38-
# 登录阿里云镜像仓库
38+
docker version &&
3939
docker login --username=${{ env.UserName }} --password=${{ secrets.Docker_Password }} ${{env.REGISTRY}}
4040
4141
- name: PNPM Install
4242
uses: pnpm/action-setup@v2
4343
with:
4444
version: 7
4545
node-version: 14.20.1
46-
# 使用 pnpm 安装依赖
4746
run_install: true
4847

4948
- name: Build And Push Docker image

.github/workflows/docs-page-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: docs-page-deploy
33
on:
44
# 每当 push 到 next 分支时触发部署
55
push:
6-
branches: [next]
6+
branches: ["next"]
77
# 手动触发部署
88
workflow_dispatch:
99

0 commit comments

Comments
 (0)