Skip to content

Commit c744d1d

Browse files
authored
Merge pull request #55 from mmdapl/feat/ci-build-image
chore: 优化CI/CD流水线,删除冗余配置
2 parents 533f685 + a20116b commit c744d1d

File tree

3 files changed

+40
-84
lines changed

3 files changed

+40
-84
lines changed

.github/workflows/CD.yaml

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ on:
1717
env:
1818
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
1919
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
20+
# 阿里云仓库信息
21+
REGISTRY: registry.cn-hangzhou.aliyuncs.com
22+
UserName: mmdapl
23+
2024

2125
jobs:
2226
install-init:
@@ -130,7 +134,7 @@ jobs:
130134
run: |
131135
zip -r JavaScriptCollection.zip . \
132136
-x "node_modules/*" \
133-
-x ".git/*" \
137+
-x ".git/*"
134138
135139
# 提取版本号
136140
- name: Get New Version Number
@@ -162,4 +166,37 @@ jobs:
162166
upload_url: ${{ steps.create_release.outputs.upload_url }}
163167
asset_path: ./JavaScriptCollection.zip
164168
asset_name: JavaScriptCollection.zip
165-
asset_content_type: application/zip
169+
asset_content_type: application/zip
170+
171+
# Deploy-ESC:
172+
# name: "部署到ESC服务器"
173+
# needs: install-init
174+
# runs-on: ubuntu-latest
175+
# ## 主库master、next且执行release更新时执行
176+
# if: github.repository == '142vip/JavaScriptCollection' && startsWith(github.event.head_commit.message, 'chore(release):')
177+
#
178+
# steps:
179+
# - name: Checkout repository
180+
# uses: actions/checkout@v3
181+
#
182+
# - name: Get Current Version
183+
# id: version
184+
# uses: ashley-taylor/read-json-property-action@v1.0
185+
# with:
186+
# path: ./package.json
187+
# property: version
188+
#
189+
# # 拉取镜像,更新服务
190+
# - name: Pull Image And Update ESC
191+
# uses: appleboy/ssh-action@master
192+
# with:
193+
# host: ${{ secrets.SERVER_HOST }}
194+
# port: ${{ secrets.SERVER_PORT }}
195+
# username: ${{ secrets.SERVER_USERNAME }}
196+
# password: ${{ secrets.SERVER_PASSWORD }}
197+
# script: |
198+
# docker images
199+
# echo "-----------正在运行的服务--------"
200+
# docker ps
201+
# cd /service_env/ && git reset --hard && git pull origin main
202+
# bash ./scripts/book_doc.deploy.sh jsc ${{steps.version.outputs.value}}

.github/workflows/CI.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
runs-on: ubuntu-latest
8181
needs: install-init
8282
## 主库master、next且执行release更新时执行
83-
if: github.repository == '142vip/408CSFamily' && startsWith(github.event.head_commit.message, 'chore(release):')
83+
if: github.repository == '142vip/JavaScriptCollection' && startsWith(github.event.head_commit.message, 'chore(release):')
8484
permissions:
8585
actions: read
8686
pull-requests: read

.github/workflows/esc-deploy.yml

Lines changed: 0 additions & 81 deletions
This file was deleted.

0 commit comments

Comments
 (0)