start-cli docs #16
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: Build and deploy docs | |
| on: | |
| push: | |
| branches: ["master"] | |
| 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 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| - name: Build docs agent widget | |
| run: | | |
| cd widget | |
| npm ci | |
| npm run build | |
| - name: Install mdBook | |
| run: | | |
| MDBOOK_VERSION='v0.5.2' | |
| curl -sSL https://github.com/rust-lang/mdBook/releases/download/${MDBOOK_VERSION}/mdbook-${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz | tar -xz | |
| sudo mv mdbook /usr/local/bin/mdbook | |
| - name: Setup Pages | |
| id: pages | |
| uses: actions/configure-pages@v5 | |
| - name: Install mdbook-tabs | |
| run: | | |
| cargo install mdbook-tabs --version 0.3.4 | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Build all books | |
| run: ./build.sh | |
| - name: Generate llms.txt | |
| run: | | |
| cd scripts | |
| npm ci | |
| npm run generate-llms-txt | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./docs | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |