Skip to content

Merge pull request #76 from B3-3iL-DLW/bug/menu #93

Merge pull request #76 from B3-3iL-DLW/bug/menu

Merge pull request #76 from B3-3iL-DLW/bug/menu #93

name: Upload backend to dev server and lint
on:
push:
branches:
- dev
env:
FLUTTER_VERSION: 3.10.1
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install SSH key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Upload PHP code
run: scp -o StrictHostKeyChecking=no -r backend ${{ secrets.SERVER_USERNAME }}@${{ secrets.SERVER_HOST }}:/home/imjames/www/API-3IL/dev
install_dependencies:
needs: deploy
runs-on: ubuntu-latest
steps:
- name: SSH Into Server and Install Composer Dependencies
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
cd /home/imjames/www/API-3IL/dev/backend
composer2 install --ignore-platform-req=ext-http --ignore-platform-req=ext-sodium
- name: SSH Into Server and execute Linter for PHP
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
cd /home/imjames/www/API-3IL/dev/backend
vendor/bin/php-cs-fixer fix src