Skip to content

Merge branch 'main' of github.com:pinkary-project/pinkary.com #2

Merge branch 'main' of github.com:pinkary-project/pinkary.com

Merge branch 'main' of github.com:pinkary-project/pinkary.com #2

Workflow file for this run

name: Tests
on:
push:
branches:
- main
jobs:
ci:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [8.3]
name: Tests
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache Dependencies
uses: actions/cache@v4
with:
path: ~/.composer/cache/files
key: dependencies-php-composer-${{ hashFiles('composer.lock') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: json, dom, curl, libxml, mbstring, zip
tools: composer:v2
coverage: none
- name: Set up Node & NPM
uses: actions/setup-node@v2
with:
node-version: '18.x'
- name: Setup Problem Matches
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install PHP dependencies
run: composer install --no-interaction --no-progress --ansi
- name: Cache dependencies
id: cache
uses: actions/cache@v4
with:
path: ./node_modules
key: modules-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm install
- name: Build dependencies
run: npm run build
- name: Prepare Laravel
run: |
cp .env.example .env
php artisan key:generate
- name: Tests
run: composer test
- name: Setup SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.FORGE_SSH_PRIVATE_KEY }}
- name: Require Forge CLI
run: composer global require laravel/forge-cli
- name: Deploy Site
run: |
forge server:switch pinkary-web-1
forge deploy pinkary.com
env:
FORGE_API_TOKEN: ${{ secrets.FORGE_API_TOKEN }}