Skip to content

Commit

Permalink
feat: add deploy file
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonyMRuiz committed Oct 31, 2024
1 parent eda0a2b commit 2727860
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/deploy-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CI/CD - Crudzaso

on:
push:
branches: [ main ]

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: executing remote ssh commands using password
uses: appleboy/ssh-action@v0.1.6
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USER }}
key: ${{ secrets.SERVER_SSH_KEY }}
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

0 comments on commit 2727860

Please sign in to comment.