test-ssh-docker
All checks were successful
SSH 连接测试 / ssh-test (push) Successful in 3m3s

This commit is contained in:
Havoc420Mac 2025-04-05 15:22:34 +08:00
parent 8fbf05ed69
commit 04a8bcb484
2 changed files with 14 additions and 14 deletions

View File

@ -64,15 +64,15 @@ jobs:
build-args: | build-args: |
BUILDKIT_INLINE_CACHE=1 BUILDKIT_INLINE_CACHE=1
# - name: 通过SSH部署到服务器 - name: SSH 部署服务器
# if: ${{ steps.branch_name.outputs.branch == 'main' }} # 仅main分支触发部署 uses: appleboy/ssh-action@master
# run: | with:
# ssh -o StrictHostKeyChecking=no \ host: '113.44.68.213'
# -i "${{ secrets.SSH_PRIVATE_KEY }}" \ username: root
# ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} << 'EOF' password: Havocantelope420
# # 拉取最新镜像 port: '22'
# docker pull ${{ env.REGISTRY }}/${{ env.GHCR_USER }}/${{ env.IMAGE_NAME }}:${{ steps.branch_name.outputs.tag }} script: |
# # 重启服务(根据实际情况修改) docker pull ghcr.io/catface-cn/catface_backend_go:latest
# docker-compose down || true docker stop catface_backend_go || true
# docker-compose up -d docker rm catface_backend_go || true
# EOF docker run -d --name catface_backend_go -p 20201:20201 ghcr.io/catface-cn/catface_backend_go:latest

View File

@ -18,5 +18,5 @@ jobs:
password: Havocantelope420 password: Havocantelope420
port: '22' port: '22'
script: | script: |
echo "Running command on remote server" docker pull hello-world
ls -lha docker run hello-world