Skip to content

Commit

Permalink
Fix frontend controller; Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
felix-schindler committed Dec 2, 2021
1 parent f0a10f5 commit ea26498
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 78 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: PHP and NPM (Svelte)

on:
push:
branches: [ svelte ]
pull_request:
branches: [ svelte ]

jobs:
php:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: Backend/Libraries/vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: cd Backend/Libraries && composer install --no-progress

- name: Run code check
run: php Backend/Libraries/vendor/bin/phpstan analyse --no-progress -c .phpstan.neon --memory-limit 500M

svelte:
runs-on: ubuntu-latest
needs: php

steps:
- uses: actions/checkout@v2

- name: Cache NPM packages
id: npm-cache
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-js-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-js-
- name: Install dependencies
run: npm ci

- name: Run code check
run: npm run check

- name: Make a working website out of all
# rsync -avhrz --delete --filter=". rsync_filter.txt" . /srv/TODO
run: |
npm run build --if-present
mv Frontend/* .
rm -rf Frontend
echo "here could be rsync"
30 changes: 0 additions & 30 deletions .github/workflows/php.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/svelte.yml

This file was deleted.

10 changes: 0 additions & 10 deletions Backend/Controllers/FrontendController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,6 @@

class FrontendController extends Controller
{
protected function getRoutes() : array
{
return [];
}

protected function userRequired() : bool
{
return false;
}

public function execute() : void
{
(new FrontendView())->render();
Expand Down

0 comments on commit ea26498

Please sign in to comment.