Skip to content

Commit

Permalink
install composer assets whilst building NPM
Browse files Browse the repository at this point in the history
  • Loading branch information
AxonC committed Mar 28, 2024
1 parent 9b782fa commit b2408d0
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,43 @@ jobs:
with:
node-version: '20'

- name: Configure PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: pcov
tools: composer:v2

# Add GitHub Auth to Composer
- name: Add Composer GitHub Token
run: composer config -g github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}

# Restore Caches
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Restore Composer Cache
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Restore Vendor From Cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.OS }}-build-${{ hashFiles('**/composer.lock') }}

# Install
- name: Install Composer Dependencies
run: |
composer install --no-interaction
php artisan package:discover
#
# NODE BUILD
# Install node_modules and run webpack
Expand Down Expand Up @@ -109,6 +146,9 @@ jobs:
- name: Remove node_modules
run: 'rm -rf node_modules'

- name: Remove vendor for NPM build.
run: 'rm -rf vendor'

#
# DEPLOYMENT
# Prepare remote environment and deploy application
Expand Down

0 comments on commit b2408d0

Please sign in to comment.