fix(search): use AST parsing for index heading extraction #17
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: mdBook | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| name: Build Book | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup mdBook | |
| uses: peaceiris/actions-mdbook@v2 | |
| with: | |
| mdbook-version: "0.5.2" | |
| - name: Install govctl | |
| uses: jaxxstorm/action-install-gh-release@v2.1.0 | |
| with: | |
| repo: govctl-org/govctl | |
| tag: latest | |
| - name: Build mdbook | |
| run: ./scripts/build-book.sh | |
| # Upload for PR inspection | |
| - name: Upload book artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: book | |
| path: docs/book | |
| # Upload for Pages deployment (main branch only) | |
| - name: Upload Pages artifact | |
| if: github.ref == 'refs/heads/main' | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: docs/book | |
| deploy: | |
| name: Deploy to Pages | |
| if: github.ref == 'refs/heads/main' | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |