diff --git a/.github/workflows/deploy-push.yml b/.github/workflows/deploy-push.yml index 864c296e..a222fe85 100644 --- a/.github/workflows/deploy-push.yml +++ b/.github/workflows/deploy-push.yml @@ -29,15 +29,24 @@ jobs: uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2 with: php-version: 8.5 + # The slides importer's phpoffice packages need zip and gd + extensions: zip, gd + + - name: Get Composer cache directory + id: composer-cache + run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT" - name: Cache Composer dependencies uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: - path: /tmp/composer-cache + path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} + # Composer runs on the runner, not in a container, so the plugin installs + # in install-ssp get the PHP extensions above, npm and a git checkout the + # runner owns - name: Install dependencies - uses: php-actions/composer@8a65f0d3c6a1d17ca4800491a40b5756a4c164f3 # v6.1.2 + run: composer install --no-interaction --no-progress --prefer-dist - name: Install phpcs run: vendor/bin/phpcs -i diff --git a/composer.json b/composer.json index d1713d56..51df4ad2 100644 --- a/composer.json +++ b/composer.json @@ -175,8 +175,8 @@ "post-update-cmd": [ "@update-ssp" ], - "install-ssp": "cd web/app/plugins/cbf-multisite;composer install;cd ../cbf-slides-importer;composer install;cd ../cbf-semantic-glossary;composer install;cd ../cbf-semantic-glossary-learndash;composer install;cd ../../../..", - "update-ssp": "cd web/app/plugins/cbf-multisite;composer update;cd ../cbf-slides-importer;composer update;cd ../cbf-semantic-glossary;composer update;cd ../cbf-semantic-glossary-learndash;composer update;cd ../../../..", + "install-ssp": "cd web/app/plugins/cbf-multisite && composer install && cd ../cbf-slides-importer && composer install && cd ../cbf-semantic-glossary && composer install && cd ../cbf-semantic-glossary-learndash && composer install && cd ../../../..", + "update-ssp": "cd web/app/plugins/cbf-multisite && composer update && cd ../cbf-slides-importer && composer update && cd ../cbf-semantic-glossary && composer update && cd ../cbf-semantic-glossary-learndash && composer update && cd ../../../..", "lint": "phpcs --standard=phpcs.xml", "lint:all": "@lint ./web/app/plugins/cbf-multisite ./web/app/plugins/cbf-slides-importer ./web/app/plugins/cbf-semantic-glossary ./web/app/plugins/cbf-semantic-glossary-learndash ./web/app/themes/cbf-academy ./web/app/themes/cbf-jobs", "fix": "phpcbf --standard=phpcs.xml",