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

build: Only deploy docs for latest tag #207

Merged
merged 4 commits into from
Aug 6, 2024
Merged

Conversation

adigitoleo
Copy link
Member

This brings us one step towards having docs for every tagged version. For now (after the next tag push) there should only be one website for the latest tagged version. Earlier versions can be built offline. Progress to #199.

In any case, it is better than the current situation: html documentation is being deployed for every single push on main, and the docs website did not indicate a version number anywhere. With these GH workflow adjustments, the docs should still be built for each PR/push to main, allowing to catch errors in the documentation setup as they arise, but the html pages will not deployed to GitHub Pages if there is no tag. The version (obtained from git describe) is also indicated clearly on the website landing page and in the API docs sidebar footer.

Related things that I rolled in here:

  • new make target to build docs (simply make html in the action spec)
  • favicon and proper branding (multiple resolutions of logo)
  • removed a duplicated sentence from the README
  • docs/template/README.md to explain how to maintain the template
  • fixed rm -r -> rm -rf in make clean recipe

This brings us one step towards having docs for every tagged version.
For now (after the next tag push) there should only be one website for
the latest tagged version. Earlier versions can be built offline.
Progress to #199.

In any case, it is better than the current situation: html documentation
is being deployed for every single push on `main`, and the docs website
did not indicate a version number anywhere. With these GH workflow
adjustments, the docs should still be _built_ for each PR/push to main,
allowing to catch errors in the documentation setup as they arise,
but the html pages will not deployed to GitHub Pages if there is no tag.
The version (obtained from `git describe`) is also indicated clearly
on the website landing page and in the API docs sidebar footer.

Related things that I rolled in here:
- new make target to build docs (simply `make html` in the action spec)
- favicon and proper branding (multiple resolutions of logo)
- removed a duplicated sentence from the README
- `docs/template/README.md` to explain how to maintain the template
- fixed `rm -r` -> `rm -rf` in `make clean` recipe
@adigitoleo

This comment was marked as resolved.

@adigitoleo
Copy link
Member Author

I just realised that based on this log maybe I don't need to duplicate the common job steps after all (b2f7d77). I guess the if-check in L63 of docs.yml only evaluates after the "Build" task has completed, so even if we aren't on top of a tag it should still check that make html works before aborting. I can remove that commit after review.

@adigitoleo adigitoleo added this to the Beta release milestone Aug 2, 2024
Copy link
Member

@Patol75 Patol75 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good; some minor comments.

tests/README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
.github/workflows/docs.yml Show resolved Hide resolved
@Patol75 Patol75 merged commit b077189 into main Aug 6, 2024
11 checks passed
@Patol75 Patol75 deleted the docs-deploy-only-tags branch August 6, 2024 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants