This repository has been archived by the owner on Feb 16, 2024. It is now read-only.
Merge pull request #14 from Clueless-Coding/feat/tests #13
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: Continuous Deployment | |
on: | |
push: | |
branches: | |
- main | |
# TODO: Build docker image and publish it to ghcr. Then pull it in deploy job | |
# https://medium.com/@odenigbo67/docker-ci-cd-in-vpc-vps-environments-automating-deployment-with-github-actions-via-ssh-or-web-e2192bb75a69 | |
jobs: | |
deploy: | |
name: Continuous Deployment | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy using ssh | |
uses: appleboy/ssh-action@v1.0.3 | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
username: ${{ secrets.SSH_USERNAME }} | |
password: ${{ secrets.SSH_PASSWORD }} | |
script: | | |
cd $HOME/apps/poketrade-back/ | |
git pull origin main | |
docker compose up --detach --build | |
docker compose exec app node ./dist/infra/postgres/migrations/run |