budget/.gitea/workflows/deploy.yaml

29 lines
679 B
YAML
Raw Normal View History

2024-06-23 10:02:02 -04:00
name: Deploy
on:
tag:
2024-07-04 23:06:35 -04:00
push:
2024-06-23 10:02:02 -04:00
jobs:
deploy:
2024-06-23 21:33:10 -04:00
runs-on: cth-ubuntu-latest
2024-06-23 10:02:02 -04:00
steps:
2024-07-04 22:51:19 -04:00
- name: Set up Docker Buildx
2024-06-23 21:04:24 -04:00
uses: docker/setup-buildx-action@v3
2024-07-04 23:06:13 -04:00
- name: Push image
uses: docker/build-push-action@v6
2024-06-23 10:02:02 -04:00
context:
push: true
2024-06-23 21:05:46 -04:00
tags: |
2024-07-04 23:06:13 -04:00
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