Create pages using mdbook #1
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: Build Book & Deploy to Vercel | |
| env: | |
| VERCEL_ORG_ID: team_1lp77eHqHVPB2Q7TMTbVsQ5c | |
| VERCEL_PROJECT_ID: prj_NuJC7Lja4bOyXLJc91AAcDo1zaA4 | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| jobs: | |
| buildAndDeploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # To push a branch | |
| pull-requests: write # To create a PR from that branch | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Install latest mdbook | |
| run: | | |
| tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name') | |
| url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz" | |
| mkdir mdbook | |
| curl -sSL $url | tar -xz --directory=./mdbook | |
| echo `pwd`/mdbook >> $GITHUB_PATH | |
| - name: Generate static content for the book | |
| run: mdbook build | |
| working-directory: agent | |
| - name: Setup Node.js (required to install Vercel CLI) | |
| uses: actions/setup-node@v4 | |
| - name: Install Vercel CLI | |
| run: npm install --global vercel | |
| - name: Pull Vercel environment information | |
| run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | |
| working-directory: agent | |
| - name: Deploy to Vercel | |
| run: vercel book --prod --token=${{ secrets.VERCEL_TOKEN }} | |
| working-directory: agent |