Skip to content

add github action

add github action #1

Workflow file for this run

name: Node.js CD
on:
push:
branches: [ "main" ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: SSH and deploy node app
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT }}
script: |
cd /var/www/Mimo
git pull origin main
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
npm run prod
composer install
php artisan cache:clear
php artisan config:cache
php artisan route:cache
php artisan optimize