climate-resource / bookshelf

A bookshelf of useful preprocessed data
https://climate-resource.github.io/bookshelf/
MIT License
2 stars 0 forks source link

docs: Build docs and deploy via gha #109

Closed lewisjared closed 3 weeks ago

lewisjared commented 3 weeks ago

Description

Add ci jobs for deploying docs

Checklist

Please confirm that this pull request has done the following:

codecov-commenter commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.98%. Comparing base (5447a29) to head (3aea9d3). Report is 6 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #109 +/- ## ======================================= Coverage 91.98% 91.98% ======================================= Files 15 15 Lines 674 674 Branches 72 72 ======================================= Hits 620 620 Misses 31 31 Partials 23 23 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

lewisjared commented 3 weeks ago

@znichollscr FYI: This is how to deploy versioned mkdocs using gh-pages. The bookshelf name wasn't available on RtDs so I thought I would experiment with deploying using GH pages which is the preferred deployment method according to mkdocs.

Overall not quite as simple as a single rtd file

Note this required running the following locally:

uv run mike deploy --update-aliases latest dev
uv run mike set-default latest
git push origin gh-pages

This generates a latest and dev build and sets the default page to latest.

znichollscr commented 3 weeks ago

Interesting. Good one to have in the locker. Do you think this is a pattern we should make sure is in our dev docs so others can use it too if they need, or is this likely a one off and we might roll this repo back to RtD at some point in future anyway (under a name like "cr-bookshelf" or something)?

lewisjared commented 2 weeks ago

I think that this is likely a one-off for now, but certainly a good to know. Given you have complete control over what is deployed you can do lots of fancy things like combining docs from multiple repos into one. That likely isn't a hammer that is needed often, but it is certainly possible