budget/.gitea/workflows/deploy.yaml
Andrew Tomaka ccfe99996f
Some checks failed
Deploy / deploy (push) Successful in 1m20s
Ruby CI / test (pull_request) Failing after 14m58s
And on push again xD
2024-07-04 23:06:35 -04:00

28 lines
679 B
YAML

name: Deploy
on:
tag:
push:
jobs:
deploy:
runs-on: cth-ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Push image
uses: docker/build-push-action@v6
context:
push: true
tags: |
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