Files
AFFiNE-Mirror/.github/workflows/compressed-size.yml

40 lines
1.1 KiB
YAML

name: Compressed Size
on:
pull_request_target:
branches:
- master
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}'
compression: 'brotli'