Skip to content

Commit 8e07aa3

Browse files
authored
feat: esc description update
1 parent 794814d commit 8e07aa3

File tree

1 file changed

+26
-19
lines changed

1 file changed

+26
-19
lines changed

.github/workflows/deploy-esc.yml

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ env:
1818

1919

2020
jobs:
21-
Docker-Image:
22-
name: "构建Docker镜像"
21+
Deploy-ESC:
22+
name: "部署到ESC"
2323
runs-on: ubuntu-latest
2424
permissions:
2525
contents: read
@@ -29,23 +29,30 @@ jobs:
2929
id-token: write
3030

3131
steps:
32-
- name: Checkout repository
33-
uses: actions/checkout@v3
34-
35-
- name: Login Docker
32+
# 列出所有镜像
33+
- name: Docker Images And Container List
3634
run: |
37-
docker version;
38-
# 登录阿里云镜像仓库
39-
docker login --username=${{ env.UserName }} --password=${{ secrets.Docker_Password }} ${{env.REGISTRY}}
35+
docker images;
36+
echo "-----------正在运行的服务--------";
37+
docker ps;
4038
41-
- name: PNPM Install
42-
uses: pnpm/action-setup@v2
39+
- name: 读取当前版本号
40+
id: version
41+
uses: ashley-taylor/read-json-property-action@v1.0
4342
with:
44-
version: 7
45-
node-version: 14.20.1
46-
# 使用 pnpm 安装依赖
47-
run_install: true
48-
49-
- name: Build And Push Docker image
50-
run:
51-
PROXY_DOMAIN=true pnpm faster-image
43+
path: ./package.json
44+
property: version
45+
# 拉取镜像,更新服务
46+
- name: Pull Image And Update ESC
47+
uses: appleboy/ssh-action@master
48+
with:
49+
host: ${{ secrets.Server_Host }}
50+
port: ${{ secrets.Server_Port }}
51+
username: ${{ secrets.Server_UserName }}
52+
password: ${{ secrets.Server_Password }}
53+
script: |
54+
docker images &&
55+
echo "-----------正在运行的服务--------" &&
56+
docker ps &&
57+
cd /service && git reset --hard && git pull origin master &&
58+
bash ./scripts/book_doc.deploy.sh jsc v${{steps.version.outputs.value}} &&

0 commit comments

Comments
 (0)