Skip to content

Commit b683d58

Browse files
committed
Set-up GitHub Action to publish blog
1 parent 136dec4 commit b683d58

File tree

2 files changed

+58
-1
lines changed

2 files changed

+58
-1
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Deploy Jekyll site to Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: false
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Install ImageMagick
27+
run: sudo apt install --yes imagemagick libmagickwand-dev
28+
29+
- name: Setup Ruby
30+
uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4
31+
with:
32+
ruby-version: '3.3'
33+
bundler-cache: true
34+
cache-version: 0
35+
36+
- name: Setup Pages
37+
id: pages
38+
uses: actions/configure-pages@v5
39+
40+
- name: Build with Jekyll
41+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
42+
env:
43+
JEKYLL_ENV: production
44+
45+
- name: Upload artifact
46+
uses: actions/upload-pages-artifact@v3
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@v4

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source "https://rubygems.org"
22

3-
gem 'jekyll-v4-github-pages', group: :jekyll_plugins
3+
gem 'jekyll', group: :jekyll_plugins
44

55
group :jekyll_plugins do
66
gem 'jekyll-responsive-image'

0 commit comments

Comments
 (0)