Merge pull request #41 from TeamAiary/refactor/code-reading-and-refac… #31
This file contains hidden or 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 : Deploy Action | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build_and_push: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name : Deploy To Server | |
| uses: appleboy/ssh-action@master | |
| id: deploy | |
| with: | |
| host: ${{ secrets.SERVER_HOST }} | |
| username: ubuntu | |
| key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| script: | | |
| cd /home/ubuntu/TA_BE | |
| git fetch origin | |
| git reset --hard origin | |
| chmod +x ./gradlew | |
| sudo ./gradlew clean build -x test | |
| sudo docker stop aiary-server | |
| sudo docker rm aiary-server | |
| sudo docker compose --env-file deploy.env up -d --build |