Skip to content

Merge remote-tracking branch 'origin/master' #87

Merge remote-tracking branch 'origin/master'

Merge remote-tracking branch 'origin/master' #87

Workflow file for this run

name: CI-CD
on: push
jobs:
compile-assets:
name: Compile assets
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Build jS
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '12'
- name: Install dependencies
run: yarn
- name: YARN Build
run: |
yarn run prod
cat public/mix-manifest.json # see version in log
- name: Upload compile assets
uses: actions/upload-artifact@v1
with:
name: assets
path: public
test-php:
name: Test/Lint PHP
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: 7.3
extensions: mbstring, bmath
- name: Composer install
run: composer install
- name: Generate artisan key
run: |
cp .env.example .env
php artisan key:generate
- name: Run tests
run: ./vendor/bin/phpunit
# deploy:
# name: Deploy to production
# runs-on: ubuntu-latest
# needs: [compile-assets, test-php]
# if: github.ref == 'refs/heads/master'
# steps:
# - uses: actions/checkout@v2
# - name: Download build assets
# uses: actions/download-artifact@v1
# with:
# name: assets
# path: public
# - name: Setup PHP
# uses: shivammathur/setup-php@master
# with:
# php-version: 7.3
# extensions: mbstring, bmath
# - name: Composer install
# run: composer install
# - name: Setup Deployer
# uses: atymic/deployer-php-action@master
# with:
# ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
# ssh-known-hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
# - name: Deploy to Prod
# run: dep deploy production --tag=${{ env.GITHUB_REF }} -vvv