Skip to content
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
b9aa54c
Replace github pages with jekyll, upgrade to ruby version 4
hopkincame Mar 2, 2026
1eae65b
Added action for deploying docs
hopkincame Mar 3, 2026
2765b38
Moved action, make CI run on current branch
hopkincame Mar 3, 2026
43ffb2c
Try adding path to gemfile
hopkincame Mar 3, 2026
b65b54e
Updated ruby version
hopkincame Mar 3, 2026
9c20d51
Try change working directory
hopkincame Mar 3, 2026
5b042fd
Change to relative directory
hopkincame Mar 3, 2026
248ac4a
Working directory attempt 2
hopkincame Mar 3, 2026
f5d5f9a
Working directory attempt 3
hopkincame Mar 3, 2026
7991099
Working directory attempt 4
hopkincame Mar 3, 2026
f0646f6
Working directory attempt 5
hopkincame Mar 3, 2026
153e48d
Working directory attempt 6
hopkincame Mar 3, 2026
0286858
Working directory attempt 7
hopkincame Mar 3, 2026
0473667
Working directory attempt 8
hopkincame Mar 3, 2026
ae2d11e
Updated ruby installer in CI so it uses version 4
hopkincame Mar 4, 2026
e2f9094
Remove working branch from doc deploy PR, update contribution docs fo…
hopkincame Mar 4, 2026
60937f5
Workflow updates, github pages picture cropped
hopkincame Mar 5, 2026
e5e8902
Ran prettier
hopkincame Mar 5, 2026
e0efb79
Change ruby version in docs docker file
hopkincame Mar 5, 2026
ca47757
Fix version for upload artifact
hopkincame Mar 5, 2026
88c62ed
Use hash for ruby version
hopkincame Mar 18, 2026
2fb421b
Merge branch 'main' into feature/ruby-4-support
hopkincame Mar 18, 2026
986a353
Removed a few gems
hopkincame Mar 19, 2026
9b18aa1
Merge branch 'main' into feature/ruby-4-support
hopkincame Mar 19, 2026
10ba4b2
Actually resolve merge conflict
hopkincame Mar 19, 2026
fcf386d
Merge branch 'main' into feature/ruby-4-support
another-rex Mar 26, 2026
ede4e4c
Merge branch 'main' into feature/ruby-4-support
Ly-Joey Mar 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Deploy Jekyll site to Pages

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.


# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# 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: "pages"
cancel-in-progress: false

jobs:
# Build job
build:
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/docs/Gemfile
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./docs
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Ruby
# https://github.com/ruby/setup-ruby/releases/tag/v1.289.0
uses: ruby/setup-ruby@19a43a6a2428d455dbd1b85344698725179c9d8c
with:
ruby-version: '4.0.1' # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 0 # Increment this number if you need to re-download cached gems
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Build with Jekyll
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: production
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./docs/_site

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,11 @@ Please follow these steps to successfully contribute documentation.
3. Preview the changes by spinning up a GitHub page for your fork, building from your working branch.
<!-- markdown-link-check-disable-next-line -->
- On your fork, go to the settings tab and then the GitHub page settings. Sample URL: https://github.com/{your-github-profile}/osv-scanner/settings/pages
- Under "Build and deployment" select "Deploy from a branch"
- Set the branch to your working branch
- Set the github page to build from the "/docs" folder
- Hit save and wait for your site to build
- Under "Build and deployment" select "Github Actions"
- Add your working branch to the on push branches (line 5) in the "docs-deploy.yml" file, this can be found in the ".github/workflows" directory
- Push your commit and wait for the pages to build
- Once it is ready, click the link and preview the docs
- If the pages were built successfully, remove your branch from the "docs-deploy.yml" workflow

![Image shows the UI settings for building the GitHub page, which is described in step 3 of the contributing documentation instructions.](docs/images/github-page.png)

Expand Down
25 changes: 15 additions & 10 deletions docs/Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ruby "~> 3"
ruby "~> 4"

source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
Expand All @@ -9,15 +9,20 @@ source "https://rubygems.org"
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
# gem "jekyll", "~> 4.3.2"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
gem "github-pages", "~> 232", group: :jekyll_plugins
# If you have any plugins, put them here!
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

gem "csv"
gem "base64"
gem "jekyll-feed", "~> 0.15"
gem "jekyll-gist"
gem "jekyll-paginate"
gem "jekyll-relative-links"
gem "jekyll-optional-front-matter"
gem "jekyll-readme-index"
gem "jekyll-default-layout"
gem "jekyll-titles-from-headings"
gem "just-the-docs"
gem "jekyll-coffeescript"
gem "jekyll-github-metadata"

# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
Expand Down
Loading
Loading