fix: 修复编译错误 #31
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: Datav Demo | |
| on: | |
| push: | |
| tags: | |
| - 'v*' # 仅当推送 v 开头的 tag 时触发,例如 v1.0.0 | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 🛎️ Checkout code | |
| uses: actions/checkout@v4 | |
| - name: 📦 Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 # 可以指定版本 | |
| - name: ⚙️ Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: 'pnpm' | |
| - name: 📥 Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: 🧱 Build project | |
| run: pnpm run build | |
| - name: 🚀 Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_branch: gh-pages | |
| publish_dir: ./dist | |
| commit_message: "Deploy from tag ${{ github.ref_name }}" |