main: Updated build workflow #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & Deploy | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
deploy: | ||
name: Deploy | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy to VPS using ssh & docker-compose | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.VPS_HOST }} | ||
username: ${{ secrets.VPS_USERNAME }} | ||
password: ${{ secrets.VPS_PASSWORD }} | ||
port: 22 | ||
script: | | ||
cd HomeFinancier/ | ||
docker-compose stop | ||
docker-compose rm -f | ||
git pull | ||
docker-compose -f deployment/docker-compose.yaml up -d |