From e49b4bc9897870410ad13051b923c07e48c1c334 Mon Sep 17 00:00:00 2001 From: Diego Andres Ramirez Mejia <157324739+DiegoAndresRamirez@users.noreply.github.com> Date: Wed, 27 Nov 2024 21:17:15 -0500 Subject: [PATCH] Update deploy-main.yml --- .github/workflows/deploy-main.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-main.yml b/.github/workflows/deploy-main.yml index db25aa7..12a0435 100644 --- a/.github/workflows/deploy-main.yml +++ b/.github/workflows/deploy-main.yml @@ -5,10 +5,10 @@ on: branches: [ main ] jobs: - test-connection: + build-and-deploy: runs-on: ubuntu-latest steps: - - name: Test SSH Connection + - name: Executing remote SSH commands using password uses: appleboy/ssh-action@v0.1.6 with: host: ${{ secrets.HOST_SERVER }} @@ -16,4 +16,12 @@ jobs: password: ${{ secrets.PASSWORD_SERVER }} port: ${{ secrets.PORT_SERVER }} script: | - echo "Connection successful to ${{ secrets.SERVER_HOST }}" + cd "${{ secrets.PATH }}" + git pull origin main + git fetch + echo '${{ secrets.ENV_FILE }}' > .env + composer install + composer dump-autoload + php artisan migrate:fresh --seed + php artisan optimize:clear +