Skip to content

[pull] next from kongying-tavern:next #15

[pull] next from kongying-tavern:next

[pull] next from kongying-tavern:next #15

name: Compressed Size
on:
pull_request:
types: [opened, synchronize]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
with:
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: '16'
# cache node_modules
- name: Cache pnpm modules
uses: actions/cache@v2
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- name: Install dependencies
uses: pnpm/action-setup@v2
with:
run_install: true
- name: Build Site
run: pnpm build
- uses: preactjs/compressed-size-action@v2
with:
clean-script: 'rm -rf dist/'
pattern: './build/**/*.{js,css,html,json}'
exclude: '{./build-output/manifest.json,**/*.map,**/node_modules/**}'