评论区投票 #122
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: Node.js CI | |
| on: | |
| push: | |
| branches: | |
| - new | |
| pull_request: | |
| branches: | |
| - new | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: 'yarn' | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Set up git hash | |
| run: echo \"$(git rev-parse --short HEAD)\" > assets/hash.json | |
| - name: Build project | |
| run: yarn build | |
| - name: Post check build ID | |
| run: | | |
| cat .output/public/index.html | grep builds/meta | |
| cat .output/public/_nuxt/builds/latest.json | |
| # 你可以添加更多步骤,例如: | |
| # - name: Lint code | |
| # run: yarn lint | |
| # - name: Deploy (if applicable) | |
| # run: yarn deploy |