Chore add ci check that the docs site builds on every pr touching docs - #28
Conversation
There was a problem hiding this comment.
CI is failing (test job, shellcheck). This PR cannot merge until that's fixed.
Root cause: this branch is based on PR #27's branch, not main (git log origin/main..HEAD shows PR #27's commit ahead of this PR's own). That's why scripts/testnet-load.sh and its unused-variable shellcheck failures at lines 229-230 show up here, and why docs-check.yml, the actual point of this PR, is buried under 382 lines that aren't yours.
Rebase onto current main so this PR only contains the docs-check workflow, and CI will pass. docs-check.yml itself is fine on its own merits, once it's not carrying #27's unresolved branch along with it.
|
Hey @Johnsource-hub, checking in on this one since it's been a few days quiet. Are you still good to continue? If you're stuck on anything, let me know here and I can help. If you're no longer able to finish it, just say so and I'll pass the issue on to someone else. |
#closes
#16
Title
chore: verify mdBook build on pull requests
Description
This pull request introduces a lightweight GitHub Actions workflow (docs-check.yml) to automatically build and verify the mdBook documentation on pull requests.
Previously, documentation builds were only run and deployed upon pushing to the main branch via .github/workflows/docs.yml. Any errors in documentation (such as malformed Markdown, invalid Mermaid syntax, or broken {{#include}} references) were not caught until after they were merged.
This workflow runs purely as a build validation step and does not deploy any code/artifacts to GitHub Pages.
Trigger Conditions
To avoid wasting runner time, the workflow is only triggered on pull_request when changes are made to the following:
Documentation files under docs/**
Project root markdown files: README.md, CONTRIBUTING.md, SECURITY.md
The workflow file itself: .github/workflows/docs-check.yml
It also supports manual execution via workflow_dispatch.
Jobs & Steps
The build job runs on ubuntu-latest and executes the following steps:
Checkout: Checks out the repository.
Install mdBook: Installs mdBook using the peaceiris/actions-mdbook action (latest version).
Install mdbook-mermaid: Pulls and extracts mdbook-mermaid (v0.17.0) to compile Mermaid diagrams.
Build book: Runs mdbook build docs to verify the build.