This commit is contained in:
parent
6f2a8150ca
commit
588a28fcbb
@ -1,4 +1,4 @@
|
||||
name: 编译部署
|
||||
name: 部署到腾讯云
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
@ -12,23 +12,21 @@ jobs:
|
||||
MYIMAGE : ${{ vars.MYIMAGE }}
|
||||
MYPORT: ${{ vars.MYPORT }}
|
||||
steps:
|
||||
- name: 检出源码
|
||||
uses: https://git.des8.com/docker/checkout@v4
|
||||
|
||||
- name: Docker Buildx
|
||||
uses: https://git.des8.com/docker/setup-buildx-action@v3
|
||||
- name: 远程部署
|
||||
uses: https://git.des8.com/docker/ssh-action@v1.0.0
|
||||
with:
|
||||
config-inline: |
|
||||
[registry."git.des8.com"]
|
||||
http = true
|
||||
insecure = true
|
||||
|
||||
- name: 编译Docker镜像
|
||||
uses: https://git.des8.com/docker/build-push-action@v5
|
||||
with:
|
||||
push: false
|
||||
tags: $MYREGISTRY/$MYIMAGE
|
||||
|
||||
- name: 运行
|
||||
run: |
|
||||
docker run -d -p 3000:$MYPORT -v $(pwd):/docs --name $MYIMAGE $MYREGISTRY/$MYIMAGE
|
||||
host: 122.51.147.115
|
||||
port: 8022
|
||||
username: root
|
||||
key: ${{ secrets.KEY }}
|
||||
script: |
|
||||
cd /www/wwwroot/doc-live.des8.com
|
||||
git clean -f
|
||||
git remote rm origin
|
||||
git remote add origin git@git.des8.com:weixiu/ai-live.git
|
||||
git fetch --all
|
||||
git reset --hard origin/main
|
||||
git pull origin main
|
||||
rm -rf /www/wwwroot/mei.des8.com/.gitea
|
||||
chown -R www:www ./
|
||||
pwd && ls -l
|
||||
|
||||
Loading…
Reference in New Issue
Block a user