Skip to content

dev: docker compose #39

dev: docker compose

dev: docker compose #39

Workflow file for this run

on:
push:
branches:
- main
jobs:
build-js-production:
name: Build JavaScript/CSS for Production Server
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v1
- name: Setup PHP
uses: shivammathur/setup-php@main
with:
php-version: '8.3'
extension-csv: mbstring, bcmath
- name: Composer install
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: NPM Build
run: |
composer install
npm install
npm run build
- name: Put built assets in Artifacts
uses: actions/upload-artifact@v1
with:
name: assets
path: public
retention-days: 3
deploy-production:
name: Deploy Project to Production Server
runs-on: ubuntu-latest
needs: [ build-js-production ]
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v1
- name: Fetch built assets from Artifacts
uses: actions/download-artifact@v1
with:
name: assets
path: public
- name: Setup PHP
uses: shivammathur/setup-php@main
with:
php-version: '8.3'
extension-csv: mbstring, bcmath
- name: Composer install
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- 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 Production
env:
DOT_ENV: ${{ secrets.DOT_ENV_PRODUCTION }}
run: php vendor/bin/dep deploy production branch=main -vvv