45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
name: Run tests & build files
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
test:
|
|
name: Run tests
|
|
uses: ploi-deploy/ploi-core/.github/workflows/run-tests.yml@master
|
|
|
|
deploy:
|
|
needs: test
|
|
name: Prepare build assets
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Setup PHP with PECL extension
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: '8.1'
|
|
extensions: pcntl
|
|
|
|
- run: composer install
|
|
name: Install dependencies
|
|
|
|
- name: Set up Node
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: '12.x'
|
|
- run: npm install
|
|
- run: rm -f public/mix-manifest.json
|
|
- run: npm run prod
|
|
|
|
- name: Commit build assets
|
|
run: |
|
|
git config --local user.email "actions@github.com"
|
|
git config --local user.name "GitHub Actions"
|
|
git checkout -B master-files master
|
|
git commit -m "Run Laravel Mix en build front-end assets"
|
|
git checkout -B master
|
|
git merge master-files
|
|
git push origin master
|