
更新了多个开发依赖项,包括 Vite 及其相关插件、unplugin 系列工具和 CI 工作流中使用的 composite-actions。 主要变更包括: - 将 pnpm 版本升级至 10.14.0。 - 升级 Vite、@vitejs/plugin-vue 等核心构建工具。 - 升级 unplugin-auto-import, unplugin-vue-components, unplugin-vue-router 等插件。 - 更新 CI 工作流中的 GitHub Actions 版本以保持同步。 - 重新生成了因依赖更新而变化的 `typed-router.d.ts` 类型文件。
58 lines
1.7 KiB
YAML
58 lines
1.7 KiB
YAML
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
env:
|
|
TZ: Asia/Shanghai
|
|
|
|
on:
|
|
push:
|
|
workflow_dispatch:
|
|
inputs:
|
|
run_cleanup:
|
|
description: '是否运行 Surge 清理 Job'
|
|
required: false
|
|
type: boolean
|
|
default: true
|
|
|
|
jobs:
|
|
surge:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
url: ${{ steps.surge_deploy.outputs.url }}
|
|
steps:
|
|
- name: ⚙️ 设置 Node 环境
|
|
uses: yanhao98/composite-actions/setup-node-environment@41ff2ce04aed748954bd860668b69edd103bba2c
|
|
- name: 🔨 构建项目
|
|
run: pnpm run build-only
|
|
env:
|
|
VITE_BUILD_COMMIT: ${{ github.sha }}
|
|
- name: 🚀 部署到 Surge
|
|
id: surge_deploy
|
|
if: ${{ github.actor != 'nektos/act' }} # https://nektosact.com/usage/index.html#skipping-steps
|
|
uses: yanhao98/composite-actions/deploy-dist-to-surge@41ff2ce04aed748954bd860668b69edd103bba2c
|
|
|
|
playwright:
|
|
needs: surge
|
|
runs-on: ubuntu-latest
|
|
container: mcr.microsoft.com/playwright:v1.54.2-noble
|
|
steps:
|
|
- name: ⚙️ 设置 Node 环境
|
|
uses: yanhao98/composite-actions/setup-node-environment@41ff2ce04aed748954bd860668b69edd103bba2c
|
|
# - name: 📥 安装 Playwright 浏览器
|
|
# run: pnpm exec playwright install --with-deps
|
|
- name: ▶️ 运行 Playwright 测试
|
|
run: npx playwright test
|
|
env:
|
|
BASE_URL: ${{ needs.surge.outputs.url }}
|
|
|
|
cleanup_surge:
|
|
runs-on: ubuntu-latest
|
|
needs: [surge, playwright]
|
|
if: github.event_name == 'push' || github.event.inputs.run_cleanup == true
|
|
steps:
|
|
- name: 🧹 清理 Surge 部署
|
|
run: npx surge teardown ${{ needs.surge.outputs.url }} --token ${{ env.SURGE_TOKEN }}
|
|
env:
|
|
SURGE_TOKEN: d843de16b331c626f10771245c56ed93
|