Merge pull request #139 from PortalTechnologiesInc/rest-versioning #18
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
| # Build and deploy docs (mdBook) to GitHub Pages when docs/ changes. | |
| name: Docs (GitHub Pages) | |
| on: | |
| push: | |
| branches: [master] | |
| paths: | |
| - 'docs/**' | |
| - '.github/workflows/docs.yml' | |
| workflow_dispatch: # allow manual run | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build-and-deploy: | |
| environment: github-pages | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup mdBook | |
| uses: peaceiris/actions-mdbook@v1 | |
| with: | |
| mdbook-version: '0.4.52' | |
| # Project site is at https://<org>.github.io/lib/ so base path is /lib/ | |
| - name: Set site URL for GitHub Pages | |
| run: sed -i 's|site-url = ".*"|site-url = "/lib/"|' docs/book.toml | |
| - name: Build docs | |
| run: mdbook build docs | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: 'docs/book' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |