fix(pages): use current playground scenarios #38
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 | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| env: | |
| CARGO_TERM_COLOR: always | |
| MDBOOK_VERSION: 0.5.4 | |
| jobs: | |
| build: | |
| name: build documentation | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pages: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| cache-dependency-path: web/report-app/package-lock.json | |
| - name: Install report app dependencies | |
| working-directory: web/report-app | |
| run: npm ci | |
| - name: Build embedded report app | |
| working-directory: web/report-app | |
| run: npm run build | |
| - name: Check embedded report assets | |
| run: git diff --exit-code -- assets/report-app.js assets/report-app.css crates/reforge-output/assets/report-app.js crates/reforge-output/assets/report-app.css | |
| - name: Install mdBook | |
| run: cargo install mdbook --version "$MDBOOK_VERSION" --locked | |
| - name: Build documentation, sample, and Playground | |
| run: node scripts/build-pages.mjs _site | |
| - name: Configure Pages | |
| uses: actions/configure-pages@v6 | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v5 | |
| with: | |
| path: _site | |
| deploy: | |
| name: deploy documentation | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: github.ref == 'refs/heads/main' | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy Pages artifact | |
| id: deployment | |
| uses: actions/deploy-pages@v5 |