Skip to content

Commit

Permalink
Update the Pipeline to test the ssh connection
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoAndresRamirez authored Nov 28, 2024
1 parent 3576c35 commit 78392e4
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions .github/workflows/deploy-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,15 @@ on:
branches: [ main ]

jobs:
build-and-deploy:
test-connection:
runs-on: ubuntu-latest
steps:
- name: Executing remote ssh commands using password
- name: Test SSH Connection
uses: appleboy/ssh-action@v0.1.6
with:
host: ${{ secrets.HOST_SERVER }}
username: ${{ secrets.USERNAME_SERVER }}
password: ${{ secrets.PASSWORD_SERVER }}
port: ${{ secrets.PORT_SERVER }}
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USER }}
password: ${{ secrets.SERVER_PASSWORD }}
port: ${{ secrets.SERVER_PORT }}
script: |
cd "${{ secrets.PATH }}"
git pull origin main
git fetch
echo '${{ secrets.ENV_FILE }}' > .env
composer i
composer dump-autoload
php artisan migrate:fresh --seed
php artisan optimize:clear
echo "Connection successful to ${{ secrets.SERVER_HOST }}"

0 comments on commit 78392e4

Please sign in to comment.