feat: updates to migrations #17
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: scp files | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy_project: | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/changed-files@v42 | |
with: | |
since_last_remote_commit: true | |
separator: "," | |
- name: copy file via ssh password | |
uses: appleboy/[email protected] | |
with: | |
host: "104.43.210.41" | |
username: "yokwejuste" | |
password: "Password123!" | |
port: "22" | |
source: "." | |
target: ${{ github.event.repository.name }} | |
build_project: | |
name: Build | |
needs: deploy_project | |
runs-on: ubuntu-latest | |
steps: | |
- name: executing remote ssh commands using password | |
uses: appleboy/[email protected] | |
with: | |
host: "104.43.210.41" | |
username: "yokwejuste" | |
password: "Password123!" | |
port: "22" | |
script: | | |
if [ "$(docker ps -aq)" != "" ]; then | |
docker rm -f $(docker ps -aq) | |
fi | |
if [ "$(docker images -q)" != "" ]; then | |
docker rmi -f $(docker images -q) | |
fi | |
if [ "$(docker volume ls -q)" != "" ]; then | |
docker volume rm -f $(docker volume ls -q) | |
fi | |
cd visuleo_port | |
docker system prune -af | |
docker compose down --volumes | |
docker compose up -d --build |