auto: 第 3 轮批量笔记 — cursor-agent + opencode 自动流水线(2756 篇) #758
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 to GitHub Pages | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - run: npm ci || npm install | |
| - run: npm run build 2>&1 | tee /tmp/build.log | |
| - name: Build diagnostics into dist/build-info.txt | |
| run: | | |
| { | |
| echo "=== source projects/ count ===" | |
| ls src/content/docs/projects/ | wc -l | |
| echo "=== source projects/ list ===" | |
| ls src/content/docs/projects/ | |
| echo "=== dist projects/ count ===" | |
| ls dist/projects/ 2>/dev/null | wc -l | |
| echo "=== dist projects/ list ===" | |
| ls dist/projects/ 2>/dev/null | |
| echo "=== dist projects/ INDEX.HTML count (real files) ===" | |
| find dist/projects -name "index.html" -type f | wc -l | |
| echo "=== dist projects/zustand/ contents ===" | |
| ls -la dist/projects/zustand/ 2>/dev/null || echo "no zustand dir" | |
| echo "=== dist projects/biome/ contents ===" | |
| ls -la dist/projects/biome/ 2>/dev/null | |
| echo "=== dist papers/ count ===" | |
| ls dist/papers/ 2>/dev/null | wc -l | |
| echo "=== sitemap projects entries ===" | |
| grep -oE "projects/[a-z-]+" dist/sitemap-0.xml | sort -u | |
| echo "=== Duplicate id warnings ===" | |
| grep -E "Duplicate id" /tmp/build.log | head -30 || echo "no duplicate id warnings" | |
| echo "=== build log tail ===" | |
| tail -40 /tmp/build.log | |
| echo "=== astro version ===" | |
| npx astro --version 2>&1 | |
| echo "=== node version ===" | |
| node --version | |
| echo "=== starlight version ===" | |
| npm ls @astrojs/starlight 2>&1 | head -5 | |
| } > dist/build-info.txt | |
| cat dist/build-info.txt | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./dist | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@v4 |