Skip to content

Commit

Permalink
feat: ci'cd
Browse files Browse the repository at this point in the history
  • Loading branch information
mamun724682 committed Nov 9, 2024
1 parent e7bd8bb commit 04e1014
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: 🚀 Deploy website on push to main
on:
push:
branches: [ v2.x ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: executing remote ssh commands
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
cd ${{ secrets.TARGET_FOLDER_PATH }}
# eval "$(ssh-agent)"
# ssh-add ~/.ssh/github_rsa
git stash
git pull
composer install --optimize-autoloader --no-dev
php artisan optimize:clear
php artisan config:cache
php artisan route:cache
php artisan view:cache
php artisan migrate --force
npm install
npm run build

0 comments on commit 04e1014

Please sign in to comment.