From 6bfa4afbb61c65bc2d902faffdb202a205375437 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Thu, 4 Jul 2024 23:06:13 -0400 Subject: [PATCH] Setup deploy to server --- .gitea/workflows/deploy.yaml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 5f1a768..2ec2115 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -9,8 +9,19 @@ jobs: steps: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - uses: docker/build-push-action@v6 + - name: Push image + uses: docker/build-push-action@v6 context: push: true tags: | - docker.atomaka.com/budget:fake + docker.atomaka.com/budget:latest + docker.atomaka.com/budget:${{gitea.sha}} + - name: Deploy to server + uses: appleboy/ssh-action@v1.0.3 + with: + host: ${{ secrets.SSH_HOST }} + username: ${{ secrets.SSH_USERNAME }} + key: ${{ secrets.SSH_KEY }} + script: | + docker pull docker.atomaka.com/budget:latest + docker restart budget