Skip to content

Commit 91cbaea

Browse files
committed
feat: add GitHub Actions workflow for Jekyll deployment to GitHub Pages
1 parent 94346e0 commit 91cbaea

File tree

2 files changed

+85
-0
lines changed

2 files changed

+85
-0
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Deploy Jekyll Documentation to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths: [ 'docs/**' ]
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Ruby
26+
uses: ruby/setup-ruby@v1
27+
with:
28+
ruby-version: '3.1'
29+
bundler-cache: true
30+
working-directory: docs
31+
32+
- name: Setup Pages
33+
id: pages
34+
uses: actions/configure-pages@v3
35+
36+
- name: Build with Jekyll
37+
working-directory: docs
38+
run: |
39+
bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
40+
env:
41+
JEKYLL_ENV: production
42+
43+
- name: Upload artifact
44+
uses: actions/upload-pages-artifact@v2
45+
with:
46+
path: docs/_site
47+
48+
deploy:
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}
52+
runs-on: ubuntu-latest
53+
needs: build
54+
steps:
55+
- name: Deploy to GitHub Pages
56+
id: deployment
57+
uses: actions/deploy-pages@v2

docs/Gemfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
source "https://rubygems.org"
2+
3+
gem "jekyll", "~> 4.3.0"
4+
gem "minimal-mistakes-jekyll"
5+
gem "jekyll-feed"
6+
gem "jekyll-sitemap"
7+
gem "jekyll-gist"
8+
gem "jekyll-include-cache"
9+
10+
group :jekyll_plugins do
11+
gem "jekyll-paginate"
12+
gem "jekyll-archives"
13+
gem "jekyll-redirect-from"
14+
end
15+
16+
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
17+
# and associated library.
18+
platforms :mingw, :x64_mingw, :mswin, :jruby do
19+
gem "tzinfo", ">= 1", "< 3"
20+
gem "tzinfo-data"
21+
end
22+
23+
# Performance-booster for watching directories on Windows
24+
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
25+
26+
# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
27+
# do not have a Java counterpart.
28+
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]

0 commit comments

Comments
 (0)