Setup deploy to server

This commit is contained in:
Andrew Tomaka 2024-07-04 23:06:13 -04:00
parent bf67ee5bac
commit 6bfa4afbb6
Signed by: atomaka
GPG key ID: 61209BF70A5B18BE

View file

@ -9,8 +9,19 @@ jobs:
steps: steps:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v6 - name: Push image
uses: docker/build-push-action@v6
context: context:
push: true push: true
tags: | 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