Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
21 changes: 21 additions & 0 deletions .github/actions/jekyll-build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Jekyll Build
description: Installs Ruby gems and builds Jekyll site
runs:
using: composite
steps:
- name: Cache Gem Dependencies
uses: actions/cache@v4
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock', '.ruby-version') }}

- name: Install Ruby Gems
shell: bash
run: |
gem install bundler
bundle config set path 'vendor/bundle'
bundle install

- name: Jekyll Build
shell: bash
run: bundle exec jekyll build
12 changes: 1 addition & 11 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,8 @@ jobs:
container: ruby:3.2.2-bookworm
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}

- name: Install Ruby dependencies.
run: |
gem install bundler
bundle install --path vendor/bundle

- name: Build static site with Jekyll.
run: bundle exec jekyll build
- uses: ./.github/actions/jekyll-build

- name: Deploy static site to gh-pages branch.
uses: peaceiris/actions-gh-pages@v3
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# GitHub Action for Jekyll
#
# Runs jekyll build on pull requests to verify that they build.

name: Test Build

on:
pull_request:
branches:
- master

jobs:
test:
runs-on: ubuntu-latest
container: ruby:3.2.2-bookworm
steps:
- uses: actions/checkout@v2

- uses: ./.github/actions/jekyll-build
Loading