Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test building docs in PRs #125

Merged
merged 16 commits into from
Mar 12, 2024
Merged

Test building docs in PRs #125

merged 16 commits into from
Mar 12, 2024

Conversation

CasperWA
Copy link
Collaborator

@CasperWA CasperWA commented Mar 8, 2024

Closes #124

This is mainly (as stated in the issue) to ensure any changes or package dependency updates do not make building the documentation fail.

Main changes:

  • Run the doc.yml ("Sphinx: Render docs") workflow for pull requests.
    Ensure the final "Deploy" step is only ever run when pushing to the 'master' branch.
  • Move the hard-coded Python package dependencies listed in the doc.yml workflow to a requirements_docs.txt file.
    The main motivation here is that Dependabot can read such a file and check if there are new updates to the dependencies here.
    Also, the (now unused) Markdown dependency has been removed.
  • Add a root .gitignore file to ensure Python-generated cache files are not committed to the repository.
    Also ignore the standard target folder for the markdown/MkDocs documentation build (site/).
  • Remove currently committed Python-generated cache files from the repository.
  • Update the minimum required versions in the requirements.txt file.

All other changes are minor syntax changes (like removing unnecessary white space, etc.)
These changes can be reverted without any actual effect (other than a possible decline in readability and unnecessary bloating of file size).


As a comment: If you've moved away from using markdown/MkDocs, I suggest to remove the (now seemingly unused) docs folder. Just to clean up the repository a bit.
I can do this in this PR, which will result in me also removing the site line in the .gitignore file?


As another note, I would assess and merge this PR before merging the PRs from Dependabot that update the package dependencies - mainly due to the fact that this PR introduces the documentation build test for PRs.

Update according to BIG-MAP/LabNotebookAppOntology.
Finalize build script.
One can build the documentation simply by running

  python docs/scripts/build.py site

It will then be built in the 'site' folder at the root of the
repository.
It utilizes the md_to_html.py script to generate HTML from all markdown
files in the 'docs' folder and sub-folders (excluding any files found in
'assets', 'css', and 'scripts').
Update CI/CD workflows
Also ensure all requirements are installed for CI
Update and add documentation for how to release a new BattINFO version
as well as how to release the documentation.
Slightly alter the `doc.yml` ("Sphinx: Render docs") CI workflow to run
on pull requests as well, but only ever deploy if pushing to the
'master' branch.
@CasperWA CasperWA added documentation Improvements or additions to documentation CI/CD Issue or PR related to continuous integration (CD) or deployment (CD) labels Mar 8, 2024
@jsimonclark jsimonclark merged commit 70a3705 into master Mar 12, 2024
2 checks passed
@jsimonclark jsimonclark deleted the cwa/close-73-reactivate-docs branch March 12, 2024 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD Issue or PR related to continuous integration (CD) or deployment (CD) documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI/CD: Add CI test workflow for building the documentation
2 participants