Skip to content

feat: Move away from github-pages gem and add ruby 4 support for docs#2588

Open
hopkincame wants to merge 27 commits intogoogle:mainfrom
hopkincame:feature/ruby-4-support
Open

feat: Move away from github-pages gem and add ruby 4 support for docs#2588
hopkincame wants to merge 27 commits intogoogle:mainfrom
hopkincame:feature/ruby-4-support

Conversation

@hopkincame
Copy link
Contributor

@hopkincame hopkincame commented Mar 4, 2026

This PR reworks the doc page deployment by removing the github pages gem and deploying using a github actions workflow. This was done to enable support for ruby 4, which is unsupported by github pages. As a result of the docs being deployed by github actions rather than pages, the deployment process for docs has changed, this PR also has an update to the contribution docs to reflect these changes. The github action workflow is set to deploy docs when there is a push to the docs branch.

This PR also adds some plugins for Jekyll. These were ones that github pages added automatically, now that we have removed github pages, thee plugins are included here instead.

Once this PR is merged, the "Pages" settings will need to be updated. The build and deployment source will need to be changed to github actions.

Copy link
Collaborator

@G-Rath G-Rath left a comment

Choose a reason for hiding this comment

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

Awesome stuff! I've made some comments but most of the changes I think I've done so they just need accepting as suggestions 😄

We also need to bump the ruby version in the Dockerfile


on:
push:
branches: [docs]
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we actually need to have a dedicated docs branch right?

I think right now the configuration is that we're deploying from main, and that should be fine; alternatively we could have it be deployed just on workflow dispatch (since the docs don't get changed with every PR), and/or as part of our release workflow (to help ensure the docs are up to date, in case we forget to publish a small update or something...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This project has a dedicated docs branch (osv.dev doesn't have one though) and based on the deployment times, it appears to be what is currently used to deploy docs. I can't see what the settings for deploys are though so I can't 100% confirm and I can change it to main if that is desired, but let's see what Google says first

Copy link
Collaborator

Choose a reason for hiding this comment

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

We are intentionally deploying from docs, the idea is if we need to add any mid release docs changes to the currently released version we can, while we still are able to make new docs updates to the upcoming changes currently in main but not released.


# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
Copy link
Collaborator

Choose a reason for hiding this comment

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

very nitty but typically we have concurrency before the permissions block

group :jekyll_plugins do
gem "jekyll-feed", "~> 0.15"
end
gem "jekyll", "~> 4.3.2"
Copy link
Collaborator

Choose a reason for hiding this comment

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

we're not necessarily using all of these plugins ay, they're just github-pages was using right?

Happy to do that for now, though it'd be good if we could try and remove ones we're obviously not using - I know for sure we have no coffeescript, and I'd guess gist and paginate probably are not being used either

@G-Rath G-Rath requested a review from another-rex March 5, 2026 00:13
@codecov-commenter
Copy link

codecov-commenter commented Mar 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.63%. Comparing base (3ba958c) to head (ede4e4c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2588      +/-   ##
==========================================
- Coverage   71.67%   71.63%   -0.04%     
==========================================
  Files         164      164              
  Lines       12080    12080              
==========================================
- Hits         8658     8654       -4     
- Misses       2794     2796       +2     
- Partials      628      630       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.


on:
push:
branches: [docs]
Copy link
Collaborator

Choose a reason for hiding this comment

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

We are intentionally deploying from docs, the idea is if we need to add any mid release docs changes to the currently released version we can, while we still are able to make new docs updates to the upcoming changes currently in main but not released.

Copy link
Collaborator

@another-rex another-rex left a comment

Choose a reason for hiding this comment

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

LGTM, just the two minor changes

docs/_config.yml Outdated
Comment on lines +33 to +41
- jekyll-coffeescript
- jekyll-gist
- jekyll-github-metadata
- jekyll-paginate
- jekyll-relative-links
- jekyll-optional-front-matter
- jekyll-readme-index
- jekyll-default-layout
- jekyll-titles-from-headings
Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems to need a lot more plugins now, can you add a bit to the PR description to explain why this is necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Comment on lines +32 to +33
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

Check notice

Code scanning / zizmor

credential persistence through GitHub Actions artifacts Note

credential persistence through GitHub Actions artifacts
@G-Rath
Copy link
Collaborator

G-Rath commented Mar 19, 2026

@hopkincame just checking you've seen this comment?

@another-rex another-rex requested a review from Ly-Joey March 26, 2026 03:06
@Ly-Joey Ly-Joey requested a review from cuixq March 26, 2026 04:24
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.

5 participants