feat: ci/cd #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} | |
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 |