-
Notifications
You must be signed in to change notification settings - Fork 545
feat: Move away from github-pages gem and add ruby 4 support for docs #2588
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
base: main
Are you sure you want to change the base?
Changes from all commits
b9aa54c
1eae65b
2765b38
43ffb2c
b65b54e
9c20d51
5b042fd
248ac4a
f5d5f9a
7991099
f0646f6
153e48d
0286858
0473667
ae2d11e
e2f9094
60937f5
e5e8902
e0efb79
ca47757
88c62ed
2fb421b
986a353
9b18aa1
10ba4b2
fcf386d
ede4e4c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| name: Deploy Jekyll site to Pages | ||
|
|
||
| on: | ||
| push: | ||
| branches: [docs] | ||
|
|
||
| # Allows you to run this workflow manually from the Actions tab | ||
| workflow_dispatch: | ||
|
|
||
| # 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: | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. very nitty but typically we have concurrency before the |
||
| group: "pages" | ||
| cancel-in-progress: false | ||
|
|
||
| # Restrict jobs in this workflow to have no permissions by default; permissions | ||
| # should be granted per job as needed using a dedicated `permissions` block | ||
| permissions: {} | ||
|
|
||
| jobs: | ||
| # Build job | ||
| build: | ||
| permissions: | ||
| contents: read | ||
| 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
|
Comment on lines
+32
to
+33
Check noticeCode scanning / zizmor credential persistence through GitHub Actions artifacts Note
credential persistence through GitHub Actions artifacts
|
||
| - name: Setup Ruby | ||
| uses: ruby/setup-ruby@19a43a6a2428d455dbd1b85344698725179c9d8c # v1.289.0 | ||
| with: | ||
| ruby-version: "4" # 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@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0 | ||
| - 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@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0 | ||
| with: | ||
| path: ./docs/_site | ||
|
|
||
| # Deployment job | ||
| deploy: | ||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
| 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@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 | ||
| 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. | ||
|
|
@@ -9,15 +9,17 @@ 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" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 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 |
||
| gem "csv" | ||
| gem "base64" | ||
| gem "jekyll-feed", "~> 0.15" | ||
| 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-github-metadata" | ||
|
|
||
| # Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem | ||
| # and associated library. | ||
|
|
||
There was a problem hiding this comment.
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...)There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.