diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 542ce03..94eafcf 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -58,20 +58,19 @@ jobs: source: "./${{ env.CI_JOB_ID }}" target: "/home/${{ secrets.CI_DEPLOY_USER }}/" - # - name: Execute server commands for deploy - # uses: appleboy/ssh-action@master - # with: - # host: ${{ secrets.CI_DEPLOY_HOST }} - # username: ${{ secrets.CI_DEPLOY_USER }} - # key: ${{ secrets.CI_DEPLOY_USER_SSH_PRIVATE_KEY }} - # script: | - # cd /home/${{ secrets.CI_DEPLOY_USER }}/${{ env.CI_JOB_ID }} - # mkdir -p /data/tchapbot + - name: Execute server commands for deploy + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.CI_DEPLOY_HOST }} + username: ${{ secrets.CI_DEPLOY_USER }} + key: ${{ secrets.CI_DEPLOY_USER_SSH_PRIVATE_KEY }} + script: | + cd /home/${{ secrets.CI_DEPLOY_USER }}/${{ env.CI_JOB_ID }} + mkdir -p /data/tchapbot - # export COMPOSE_FILE=/home/${{ secrets.CI_DEPLOY_USER }}/${{ env.CI_JOB_ID }}/docker-compose.yml - # export COMPOSE_PROJECT_NAME=albert-tchapbot + export COMPOSE_FILE=/home/${{ secrets.CI_DEPLOY_USER }}/${{ env.CI_JOB_ID }}/docker-compose.yml + export COMPOSE_PROJECT_NAME=albert-tchapbot - # docker compose down - # docker compose up --detach + docker compose down + docker compose up --detach - # rm -rf /home/${{ secrets.CI_DEPLOY_USER }}/${{ env.CI_JOB_ID }}