fix: 404 year board #60
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Laravel | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
laravel-tests: | |
runs-on: [self-hosted, linux, x64] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Copy .env | |
run: php -r "file_exists('.env') || copy('.env.example', '.env');" | |
- name: Install Dependencies | |
run: php8.1 /sites/composer.phar install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist | |
- name: Install JS Dependencies | |
run: pnpm install | |
- name: Generate key | |
run: php8.1 artisan key:generate | |
- name: Directory Permissions | |
run: chmod -R 777 storage bootstrap/cache | |
- name: Create Database | |
run: | | |
mkdir -p database | |
touch database/database.sqlite | |
- name: Build JS assets | |
run: pnpm build | |
- name: Execute tests (Unit and Feature tests) via PHPUnit | |
env: | |
DB_CONNECTION: sqlite | |
DB_DATABASE: database/database.sqlite | |
run: php8.1 artisan test | |
- name: Deploy | |
run: git -C /sites/smcu-admin pull https://keenthekeen:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git && php8.1 /sites/composer.phar install -d /sites/smcu-admin --no-dev && pnpm --prefix /sites/smcu-admin install && pnpm --prefix /sites/smcu-admin build |