Skip to content

Commit f2d73d1

Browse files
034: build docs with bundler instead of jekyll-build-pages
The actions/jekyll-build-pages action only supports the small set of themes bundled with the github-pages gem (minima, slate, etc.). It cannot resolve just-the-docs, which fails the build with: The just-the-docs theme could not be found. Switch to ruby/setup-ruby + bundle exec jekyll build so the Gemfile is honored. Pin jekyll ~> 4.3 and just-the-docs ~> 0.10.
1 parent 23d14d1 commit f2d73d1

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

.github/workflows/docs.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,33 @@ concurrency:
2323
jobs:
2424
build:
2525
runs-on: ubuntu-latest
26+
defaults:
27+
run:
28+
working-directory: docs
2629
steps:
2730
- name: Checkout
2831
uses: actions/checkout@v4
2932

33+
- name: Setup Ruby
34+
uses: ruby/setup-ruby@v1
35+
with:
36+
ruby-version: '3.3'
37+
bundler-cache: true
38+
working-directory: docs
39+
3040
- name: Setup Pages
41+
id: pages
3142
uses: actions/configure-pages@v5
3243

3344
- name: Build with Jekyll
34-
uses: actions/jekyll-build-pages@v1
35-
with:
36-
source: ./docs
37-
destination: ./_site
45+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
46+
env:
47+
JEKYLL_ENV: production
3848

3949
- name: Upload artifact
4050
uses: actions/upload-pages-artifact@v3
51+
with:
52+
path: docs/_site
4153

4254
deploy:
4355
environment:

docs/Gemfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
source "https://rubygems.org"
22

3-
gem "jekyll-seo-tag"
4-
gem "just-the-docs"
3+
gem "jekyll", "~> 4.3"
4+
gem "just-the-docs", "~> 0.10"
5+
gem "jekyll-seo-tag", "~> 2.8"
6+
7+
# Windows / JRuby support (no-op on Linux runners)
8+
platforms :mingw, :x64_mingw, :mswin, :jruby do
9+
gem "tzinfo", ">= 1", "< 3"
10+
gem "tzinfo-data"
11+
gem "wdm", "~> 0.1"
12+
end

0 commit comments

Comments
 (0)