Skip to content

feat: add gabia version #2

feat: add gabia version

feat: add gabia version #2

Workflow file for this run

name: Deploy to EC2
on:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: deploy-production
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy over SSH
uses: appleboy/ssh-action@v1.2.0
with:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USER }}
key: ${{ secrets.EC2_KEY }}
port: ${{ secrets.PORT }}
script_stop: true
script: |
set -e
APP_DIR=/var/www/remit
BRANCH=main
cd "$APP_DIR"
git fetch origin "$BRANCH"
git checkout "$BRANCH"
git pull origin "$BRANCH"
composer install --no-dev --optimize-autoloader
if [ -f package-lock.json ]; then
npm ci
else
npm install
fi
npm run build
php artisan migrate --force
php artisan optimize:clear
php artisan config:cache
php artisan route:cache
php artisan view:cache