Rebuild the public site as a unified static-first knowledge system #19
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: Pull Request | |
| on: [pull_request] | |
| permissions: | |
| contents: read | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 | |
| with: | |
| node-version-file: .nvmrc | |
| cache: npm | |
| - run: npm ci | |
| - name: Refresh canonical and organization data | |
| run: npm run refresh:data | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Verify canon authority | |
| run: node -e "const c=require('./src/_data/generated/canon.json'); if(c.source.repository!=='wayseer00/wayseer.github.io'||c.source.path!=='canon/the_interdependent_way.md') process.exit(1)" | |
| - name: Verify canon unit evidence | |
| run: node -e "const c=require('./src/_data/generated/canon.json'); if(!c.source.contentSha256||c.source.contentSha256.length!==64||!c.units.length||c.units.some(u=>!u.id||!u.hash)) process.exit(1)" | |
| - name: Verify repository route coverage | |
| run: node -e "const r=require('./src/_data/generated/repos.json'); if(r.publicRepoCount!==r.generatedRouteCount||new Set(r.repositories.map(x=>x.slug)).size!==r.repositories.length) process.exit(1)" | |
| - name: Verify recovery inputs | |
| run: test -s fallback/index.html && test -s artifacts/four-cuts-1.html | |
| - name: Validate generated content contracts | |
| run: npm run validate | |
| - name: Generate Eleventy site | |
| run: | | |
| set -o pipefail | |
| npx eleventy 2>&1 | tee eleventy-build.log | |
| - name: Preserve Eleventy failure log | |
| if: failure() | |
| uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
| with: | |
| name: eleventy-failure-${{ github.sha }} | |
| path: eleventy-build.log | |
| retention-days: 3 | |
| - name: Generate Pagefind search index | |
| run: npx pagefind --site _site | |
| - name: Run Node contract tests | |
| run: npm test |