Skip to content

Commit

Permalink
ci: setup bundle size action
Browse files Browse the repository at this point in the history
  • Loading branch information
petermakowski committed Apr 26, 2024
1 parent 8151fef commit 8415e9f
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/bundle-size.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Bundle Size

on:
push:
branches:
- ci-bundle-size-action
pull_request:
branches:
- main

jobs:
bundle-size:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Restore node_modules
id: yarn-cache
uses: actions/cache@v4
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Use Node.js from .nvmrc
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: Install
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: CYPRESS_INSTALL_BINARY=0 yarn install
- name: Build assets
run: yarn build
- uses: preactjs/compressed-size-action@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
clean-script: "clean"

0 comments on commit 8415e9f

Please sign in to comment.