-name:Set up npm ${{ steps.versions.outputs.npmVersion }}
run:npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
-name:Install dependencies & build
run:|
npm ci
npm run build --if-present
-name:Check webpack build changes
run:|
bash -c "[[ ! \"`git status --porcelain `\" ]] || (echo 'Please recompile and commit the assets, see the section \"Show changes on failure\" for details' && exit 1)"
-name:Show changes on failure
if:failure()
run:|
git status
git --no-pager diff
exit 1 # make it red to grab attention
-name:Install dependencies
run:npm ci
summary:
runs-on:ubuntu-latest
needs:
-build
if:always()
name:build-summary
steps:
-name:Build status
run:if ${{ needs.build.result != 'success' && needs.build.result != 'skipped' }}; then exit 1; fi