feat(im-bridge): 工具行展示文件改动预览并统一 emoji 状态符 #258
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: Deploy Playground to GitHub Pages | |
| on: | |
| push: | |
| branches: [main, master] | |
| paths: | |
| - "packages/playground/**" | |
| - "packages/app/**" | |
| - "packages/core/**" | |
| - "pnpm-lock.yaml" | |
| - "package.json" | |
| - ".github/workflows/playground-pages.yml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: playground-pages | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 11.9.0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 26.4.0 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile --ignore-scripts | |
| - name: Generate WXT types (extension .wxt) | |
| # --ignore-scripts skips the extension postinstall ("wxt prepare"), so | |
| # ./.wxt/tsconfig.json is never generated. Without it, the playground's | |
| # vite 8 / rolldown oxc tsconfig auto-discovery fails: it loads the root | |
| # tsconfig's references (packages/extension extends ./.wxt/tsconfig.json) | |
| # and aborts with "Tsconfig not found". | |
| run: pnpm --filter @my-agent/extension exec wxt prepare | |
| - name: Build playground | |
| env: | |
| # Prefer repo Variables; also accept Secrets (same name) if Variables is empty. | |
| # Must be Repository-level (not only the github-pages Environment) — the build job has no environment. | |
| VITE_FETCH_PROXY_URL: ${{ vars.VITE_FETCH_PROXY_URL || secrets.VITE_FETCH_PROXY_URL }} | |
| run: | | |
| if [ -n "$VITE_FETCH_PROXY_URL" ]; then | |
| echo "VITE_FETCH_PROXY_URL is set (length=${#VITE_FETCH_PROXY_URL})" | |
| else | |
| echo "::warning::VITE_FETCH_PROXY_URL is empty — webfetch/websearch will fail on GitHub Pages. Add a Repository Variable or Secret named VITE_FETCH_PROXY_URL, then re-run this workflow." | |
| fi | |
| pnpm build:core && pnpm --filter @my-agent/node build && pnpm build:server && pnpm build:app && pnpm build:playground | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: packages/playground/dist | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |