This repository was archived by the owner on May 31, 2026. It is now read-only.
docs(archive): superseded by https://kineticgain.com/trust/ai-tabletop/ #5
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: pages | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| jobs: | |
| build-deploy: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run prerender | |
| - name: SEO assets (robots.txt + sitemap.xml) | |
| run: | | |
| DOMAIN=$(cat CNAME 2>/dev/null | tr -d '[:space:]') | |
| if [ -n "$DOMAIN" ]; then | |
| printf 'User-agent: *\nAllow: /\nSitemap: https://%s/sitemap.xml\n' "$DOMAIN" > site/robots.txt | |
| TODAY=$(date -u +%Y-%m-%d) | |
| { | |
| echo '<?xml version="1.0" encoding="UTF-8"?>' | |
| echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' | |
| while IFS= read -r -d '' f; do | |
| rel="${f#site/}" | |
| if [ "$rel" = "index.html" ]; then | |
| loc="https://$DOMAIN/" | |
| elif [[ "$rel" == */index.html ]]; then | |
| loc="https://$DOMAIN/${rel%index.html}" | |
| else | |
| loc="https://$DOMAIN/$rel" | |
| fi | |
| echo " <url><loc>$loc</loc><lastmod>$TODAY</lastmod></url>" | |
| done < <(find site -name '*.html' -print0) | |
| echo '</urlset>' | |
| } > site/sitemap.xml | |
| echo "wrote site/robots.txt + site/sitemap.xml for $DOMAIN" | |
| node scripts/seo-meta.mjs "$DOMAIN" | |
| else | |
| echo "no CNAME -> skipping SEO assets" | |
| fi | |
| - uses: actions/configure-pages@v5 | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: site | |
| - id: deployment | |
| uses: actions/deploy-pages@v4 |