Skip to content

Commit

Permalink
Monitor app size with size-limit
Browse files Browse the repository at this point in the history
  • Loading branch information
meduzen committed Nov 11, 2023
1 parent 25f5d4d commit 74c9295
Show file tree
Hide file tree
Showing 4 changed files with 1,291 additions and 27 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/size-limit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Size limit

on:
pull_request:
branches: [ main ]

permissions:
pull-requests: write

jobs:
size:
runs-on: ubuntu-latest
env:
CI_JOB_NUMBER: 1

strategy:
matrix:
node-version: [20]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- run: npm ci

- name: Use Size limit
uses: andresz1/size-limit-action@dd31dce7dcc72a041fd3e49abf0502b13fc4ce05
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
22 changes: 22 additions & 0 deletions .size-limit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[
{
"name": "Everything",
"path": "public",
"brotli": true
},
{
"name": "Assets",
"path": ["public/assets"],
"brotli": true
},
{
"name": "Articles",
"path": ["public/articles"],
"brotli": true
},
{
"name": "Notes",
"path": ["public/notes"],
"brotli": true
}
]
Loading

0 comments on commit 74c9295

Please sign in to comment.