优化样式 #78
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Deploy | |
| permissions: | |
| contents: write | |
| # 触发条件:在推送 tag 时触发 | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| # 任务 | |
| jobs: | |
| build: | |
| # 服务器环境:最新版 Ubuntu | |
| runs-on: ubuntu-latest | |
| steps: | |
| # 拉取代码 | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # 设置 pnpm | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| # 设置 Node.js 环境 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| registry-url: https://registry.npmjs.org | |
| cache: pnpm | |
| # 安装依赖 | |
| - name: Install Dependencies | |
| run: pnpm i | |
| # 构建项目 | |
| - name: Build with tsup | |
| run: pnpm rpc_build && pnpm server_build && pnpm frontend_build | |
| # 部署到自定义分支 | |
| - name: Deploy to Custom Branch | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./apps/frontend/dist |