Merge pull request #6002 from guardian/generic-checkout-design #2033
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Bundle Analyser | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build_check: | |
if: github.repository_owner == 'guardian' | |
name: Bundle Analyser | |
defaults: | |
run: | |
working-directory: support-frontend | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
# Cache npm dependencies using https://github.com/bahmutov/npm-install | |
- name: Cache dependencies | |
uses: bahmutov/npm-install@v1 | |
with: | |
working-directory: support-frontend | |
- name: Install | |
run: yarn | |
- name: Generate production build for github action | |
run: yarn build-github-action | |
- name: Run Bundle Analyser | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bundle-analyser-report | |
path: support-frontend/public/compiled-assets/webpack-stats.html |