Skip to content

✅ 2.1.9

✅ 2.1.9 #1

Workflow file for this run

# This workflow will do a clean install of node dependencies,
# build the frontend, push files to remote dev and remotely build backend
# as soon as there are pushes to the main branch
name: Build & Deploy (Production)
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Push project files to testing environment
uses: burnett01/[email protected]
with:
switches: -avzr --exclude={'.git*','node_modules','.editorconfig','.env.*','vendor','storage'}
# rsh: uptime
path: ./
remote_path: ${{ secrets.DEPLOY_PATH }}
remote_host: ${{ secrets.DEPLOY_HOST }}
remote_port: ${{ secrets.DEPLOY_PORT }}
remote_user: ${{ secrets.DEPLOY_USER }}
remote_key: ${{ secrets.DEPLOY_SSH_KEY }}
remote_key_pass: ${{ secrets.DEPLOY_SSH_PHRASE }}
- name: Build backend
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEPLOY_HOST }}
port: ${{ secrets.DEPLOY_PORT }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_SSH_KEY }}
passphrase: ${{ secrets.DEPLOY_SSH_PHRASE }}
script: |
cd ${{ secrets.DEPLOY_PATH }}
php8.3 -f /usr/bin/composer update -qn
php8.3 -f /usr/bin/composer install -qno --no-ansi --no-scripts --no-progress
php8.3 artisan migrate --force
php8.3 artisan config:clear
php8.3 artisan config:cache
php8.3 artisan route:clear
php8.3 artisan route:cache
php8.3 artisan view:clear
php8.3 artisan view:cache
php8.3 artisan icons:cache
rm -rf node_modules .git* .editorconfig .env.* *.config.js