Add step to run website build when documentation is updated
Right now documentation build runs only in development, we should also run it when PR is created and documentation changes are present
What's the need to run this on PR create ?
Because if there is any syntax issue in docs the compiling is failed an development will show failed for those two jobs.
Moreover a separate PR needs to be created to fix it
To address this, we should be able to spin up a docker container in local environment and test the same.
Actions have a limited free bandwidth, adding new workflows increases risk of builds getting throttled https://docs.github.com/en/billing/managing-billing-for-your-products/about-billing-for-github-actions
- these quota apply for the private repositories and not for opensource repo
GitHub Actions usage is free for standard GitHub-hosted runners in public repositories, and for self-hosted runners. - the number of documentation changes are not much, and any PR not created by any contributor require maintainer's approval.
Yes, it should be done in local environment but it would be helpful for the reviewers if this is automated.
Even if the quota doesn't apply we should test these issue on docker locally before raising these PRs. Compile errors shouldn't land on github
@gizmo-rt, @aryanmehrotra What about adding a makefile to run all the pipelines in local. However it's code will get added in the main repo.
Else we can have a separate CLI tool for the same. It would not be included in the repo ...but can perform the same task in local ?
@aryanmehrotra @gizmo-rt What about these suggestions?
- We'll add a conditional step to our existing
go.ymlworkflow that runs documentation builds only when docs files are changed. - We'll update our
CONTRIBUTING.mdto include: "When modifying documentation, please test your changes locally by running docker build to ensure there are no syntax errors before submitting your PR. (Maybe we can add the steps to build also here)