feat: 添加构建大小计算步骤;更新依赖项,新增 vite-plugin-singlefile 插件
This commit is contained in:
11
.github/workflows/playwright.yaml
vendored
11
.github/workflows/playwright.yaml
vendored
@ -1,10 +1,13 @@
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
env:
|
||||
TZ: Asia/Shanghai
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
surge:
|
||||
runs-on: ubuntu-latest
|
||||
@ -15,6 +18,14 @@ jobs:
|
||||
- run: pnpm run build-only
|
||||
env:
|
||||
VITE_BUILD_COMMIT: ${{ github.sha }}
|
||||
- name: 计算构建大小
|
||||
working-directory: dist
|
||||
run: |
|
||||
set -x
|
||||
du -sk . | cut -f1 # 以千字节(KB)为单位
|
||||
du -sm . | cut -f1 # 以兆字节(MB)为单位
|
||||
du -s --si . | cut -f1 # 使用SI单位(基于1000而非1024)
|
||||
du -sh . | cut -f1 # 以人类可读的方式
|
||||
- name: 部署到 Surge
|
||||
id: surge_deploy
|
||||
if: ${{ github.actor != 'nektos/act' }} # https://nektosact.com/usage/index.html#skipping-steps
|
||||
|
Reference in New Issue
Block a user