Adding page-level table of contents and fix the edit url path (#1629) #29
This file contains 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: "e-Manifest Services Docs" | |
# This workflow builds and deploys the USEPA e-Manifest web service documentation | |
# It will only deploy to GitHub if the repo is 'USEPA/e-manifest' | |
on: | |
push: | |
branches: | |
- 'master' | |
- 'main' | |
paths: | |
- 'docs/**/*' | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
env: | |
BOOK_DIRECTORY: ./docs | |
MDBOOK_VERSION: v0.4.37 | |
jobs: | |
build_docs: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ${{ env.BOOK_DIRECTORY }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup mdBook | |
run: | | |
mkdir bin | |
curl -sSL https://github.com/rust-lang/mdBook/releases/download/${{env.MDBOOK_VERSION}}/mdbook-${{env.MDBOOK_VERSION}}-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin | |
- name: Build Documentation | |
run: bin/mdbook build | |
- name: upload Docs | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: "${{ env.BOOK_DIRECTORY }}/book" | |
deploy_pages: | |
if: github.repository == 'USEPA/e-manifest' | |
needs: build_docs | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |