Skip to content

Close #44. Initializes scheduled jobs for notifications and fixes som… #12

Close #44. Initializes scheduled jobs for notifications and fixes som…

Close #44. Initializes scheduled jobs for notifications and fixes som… #12

Workflow file for this run

name: Build and deploy to production
on:
push:
branches: [production]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.2"
- name: Install Composer Dependencies
run: composer require power-components/livewire-powergrid:5.* --no-interaction --no-progress --prefer-dist
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "latest"
- run: npm ci
- run: npm run build
- name: Commit built assets
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git checkout -B deploy
git add -f public/
git commit -m "Build front-end assets"
git push -f origin deploy
- name: Deploy to production
uses: appleboy/ssh-action@master
with:
username: ${{ secrets.SSH_USERNAME }}
host: ${{ secrets.SSH_HOST }}
key: ${{ secrets.SSH_KEY }}
script: "cd /var/www/proma && ./server_deploy.sh"