Compare commits
1 Commits
bf91b1c53d
...
c49b5044d9
| Author | SHA1 | Date | |
|---|---|---|---|
| c49b5044d9 |
BIN
.gitea/.DS_Store
vendored
BIN
.gitea/.DS_Store
vendored
Binary file not shown.
@@ -5,8 +5,6 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- master
|
|
||||||
workflow_dispatch: {}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
build-and-deploy:
|
||||||
@@ -43,7 +41,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
# 镜像标签,推送到私有 Registry/1
|
# 镜像标签,推送到私有 Registry
|
||||||
tags: 121.43.104.161:6500/quant-speed-page:latest
|
tags: 121.43.104.161:6500/quant-speed-page:latest
|
||||||
|
|
||||||
# 3. 部署到服务器
|
# 3. 部署到服务器
|
||||||
@@ -51,13 +49,10 @@ jobs:
|
|||||||
# uses: appleboy/ssh-action@master
|
# uses: appleboy/ssh-action@master
|
||||||
# 换用 garygrossgarten/github-action-ssh,它不依赖外部下载
|
# 换用 garygrossgarten/github-action-ssh,它不依赖外部下载
|
||||||
uses: garygrossgarten/github-action-ssh@release
|
uses: garygrossgarten/github-action-ssh@release
|
||||||
env:
|
|
||||||
QUANT_PASSWORD: ${{ secrets.QUANT_PASSWORD }}
|
|
||||||
with:
|
with:
|
||||||
host: 121.40.192.128
|
host: 121.40.192.128
|
||||||
port: 22
|
|
||||||
username: root
|
username: root
|
||||||
password: ${{ secrets.QUANT_PASSWORD }}
|
password: ${{ QUANT_PASSWORD }}
|
||||||
command: |
|
command: |
|
||||||
# 停止并删除旧容器
|
# 停止并删除旧容器
|
||||||
docker stop quant-speed-page || true
|
docker stop quant-speed-page || true
|
||||||
@@ -66,9 +61,9 @@ jobs:
|
|||||||
# 拉取最新镜像
|
# 拉取最新镜像
|
||||||
docker pull 121.43.104.161:6500/quant-speed-page:latest
|
docker pull 121.43.104.161:6500/quant-speed-page:latest
|
||||||
|
|
||||||
# 启动新容器/
|
# 启动新容器
|
||||||
docker run -d \
|
docker run -d \
|
||||||
--name quant-speed-page \
|
--name quant-speed-page \
|
||||||
--restart unless-stopped \
|
--restart unless-stopped \
|
||||||
-p 8080:80 \
|
-p 80:80 \
|
||||||
121.43.104.161:6500/quant-speed-page:latest
|
121.43.104.161:6500/quant-speed-page:latest
|
||||||
|
|||||||
Reference in New Issue
Block a user