mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
ci: add compressed-size.yml (#1328)
This commit is contained in:
35
.github/workflows/compressed-size.yml
vendored
Normal file
35
.github/workflows/compressed-size.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
name: Compressed Size
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: pnpm/action-setup@v2
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
registry-url: https://npm.pkg.github.com
|
||||
scope: '@toeverything'
|
||||
cache: 'pnpm'
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
${{ github.workspace }}/apps/web/.next/cache
|
||||
key: ${{ runner.os }}-affine-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-affine-${{ hashFiles('**/pnpm-lock.yaml') }}-
|
||||
- name: Build
|
||||
run: |
|
||||
pnpm install --frozen-lockfile
|
||||
pnpm run build
|
||||
- uses: preactjs/compressed-size-action@v2
|
||||
env:
|
||||
ENABLE_DEBUG_PAGE: ''
|
||||
with:
|
||||
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||
build-script: 'export'
|
||||
pattern: 'apps/web/out/**/*.{js,css,html,json}'
|
||||
Reference in New Issue
Block a user