Skip to content

Commit cc2e23e

Browse files
Update Jekyll deployment workflow for GitHub Pages
Fix main -> master issue
1 parent 63b8079 commit cc2e23e

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

.github/workflows/jekyll-gh-pages.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
2-
name: Deploy Jekyll with GitHub Pages dependencies preinstalled
2+
name: Deploy Jekyll site to Pages
33

44
on:
55
# Runs on pushes targeting the default branch
66
push:
7-
branches: ["main"]
7+
branches: ["master"]
88

99
# Allows you to run this workflow manually from the Actions tab
1010
workflow_dispatch:
@@ -28,14 +28,23 @@ jobs:
2828
steps:
2929
- name: Checkout
3030
uses: actions/checkout@v4
31+
- name: Setup Ruby
32+
# https://github.com/ruby/setup-ruby/releases/tag/v1.207.0
33+
uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4
34+
with:
35+
ruby-version: '3.1' # Not needed with a .ruby-version file
36+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
37+
cache-version: 0 # Increment this number if you need to re-download cached gems
3138
- name: Setup Pages
39+
id: pages
3240
uses: actions/configure-pages@v5
3341
- name: Build with Jekyll
34-
uses: actions/jekyll-build-pages@v1
35-
with:
36-
source: ./
37-
destination: ./_site
42+
# Outputs to the './_site' directory by default
43+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
44+
env:
45+
JEKYLL_ENV: production
3846
- name: Upload artifact
47+
# Automatically uploads an artifact from the './_site' directory by default
3948
uses: actions/upload-pages-artifact@v3
4049

4150
# Deployment job

0 commit comments

Comments
 (0)