fix: validation edge cases, schema consistency, and tooling reliability #221
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: Documentation | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| paths: | |
| - 'docs/**' | |
| - 'docs.json' | |
| - 'llms.txt' | |
| pull_request: | |
| branches: [ "main" ] | |
| paths: | |
| - 'docs/**' | |
| - 'docs.json' | |
| - 'llms.txt' | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Install docs.page CLI | |
| run: npm install -g @docs.page/cli | |
| - name: Verify llms.txt static redirect | |
| run: | | |
| test -s llms.txt || { | |
| echo "llms.txt is missing or empty." | |
| exit 1 | |
| } | |
| grep -q '^redirect: https://raw.githubusercontent.com/btwld/ack/main/llms.txt$' docs/llms.txt.mdx || { | |
| echo "docs/llms.txt.mdx must redirect to the canonical raw llms.txt URL." | |
| exit 1 | |
| } | |
| - name: Validate documentation | |
| run: npx @docs.page/cli check | |
| notify: | |
| needs: validate | |
| if: success() && github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Notify docs.page update | |
| run: | | |
| echo "Documentation has been updated and is now available at https://docs.page/btwld/ack" | |
| # You could add additional notification steps here, such as: | |
| # - Sending a Slack message | |
| # - Creating a GitHub issue | |
| # - Sending an email notification |