mirror of
https://github.com/woodchen-ink/certimate.git
synced 2025-07-18 09:21:56 +08:00
添加部署
This commit is contained in:
parent
5ade08bc9d
commit
d7532b4c45
20
.github/workflows/push_image.yml
vendored
20
.github/workflows/push_image.yml
vendored
@ -24,7 +24,7 @@ jobs:
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
woodchen/certimate
|
||||
woodchen/certimate:latest
|
||||
|
||||
- name: Log in to DOCKERHUB
|
||||
uses: docker/login-action@v3
|
||||
@ -37,6 +37,22 @@ jobs:
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
|
||||
- name: 部署到服务器
|
||||
uses: appleboy/ssh-action@master
|
||||
env:
|
||||
DOCKER_IMAGE: woodchen/certimate:latest
|
||||
PROJECT_PATH: ${{ secrets.PROJECT_PATH }}
|
||||
with:
|
||||
host: ${{ secrets.SERVER_IP }}
|
||||
username: root
|
||||
key: ${{ secrets.SERVER_SSH_KEY }}
|
||||
envs: DOCKER_IMAGE,PROJECT_PATH
|
||||
script: |
|
||||
docker pull $DOCKER_IMAGE
|
||||
cd $PROJECT_PATH
|
||||
docker compose down
|
||||
docker compose up -d
|
||||
|
Loading…
x
Reference in New Issue
Block a user