Skip to content

Commit

Permalink
Update deploy-main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoAndresRamirez authored Nov 28, 2024
1 parent cbc1cce commit e49b4bc
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/deploy-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,23 @@ 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 }}
username: ${{ secrets.USERNAME_SERVER }}
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

0 comments on commit e49b4bc

Please sign in to comment.