Skip to content

Commit 320aa68

Browse files
committed
Enable GitHub Pages deployment with clean Jekyll workflow
1 parent 2cfd669 commit 320aa68

File tree

1 file changed

+51
-70
lines changed

1 file changed

+51
-70
lines changed

.github/workflows/jekyll.yml

Lines changed: 51 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,54 @@
1-
# # This workflow uses actions that are not certified by GitHub.
2-
# # They are provided by a third-party and are governed by
3-
# # separate terms of service, privacy policy, and support
4-
# # documentation.
5-
6-
# # Sample workflow for building and deploying a Jekyll site to GitHub Pages
7-
# name: Deploy Jekyll site to Pages
8-
9-
# on:
10-
# # Runs on pushes targeting the default branch
11-
# push:
12-
# branches: ["master"]
13-
14-
# # Allows you to run this workflow manually from the Actions tab
15-
# workflow_dispatch:
16-
17-
# # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
18-
# permissions:
19-
# contents: read
20-
# pages: write
21-
# id-token: write
22-
23-
# # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
24-
# # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
25-
# concurrency:
26-
# group: "pages"
27-
# cancel-in-progress: false
28-
29-
# jobs:
30-
# # Build job
31-
# build:
32-
# runs-on: ubuntu-latest
33-
# steps:
34-
# - name: Checkout
35-
# uses: actions/checkout@v2
36-
# - name: Setup Ruby
37-
# run:
38-
# sudo apt-get update
39-
# sudo apt-get install -y git curl autoconf bison build-essential libssl-dev libyaml-dev libreadline-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm-dev
40-
# git clone https://github.com/rbenv/ruby-build.git ~/.ruby-build
41-
# sudo ~/.ruby-build/install.sh
42-
# ruby-build 3.1.4 /opt/hostedtoolcache/Ruby/3.1.4/x64
43-
# touch /opt/hostedtoolcache/Ruby/3.1.4/x64.complete
44-
# echo "/opt/hostedtoolcache/Ruby/3.1.4/x64/bin" >> $GITHUB_PATH
45-
# # uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0
46-
# # with:
47-
# # ruby-version: '3.1' # Not needed with a .ruby-version file
48-
# # bundler-cache: true # runs 'bundle install' and caches installed gems automatically
49-
# # cache-version: 0 # Increment this number if you need to re-download cached gems
50-
# - name: Setup Pages
51-
# id: pages
52-
# uses: actions/configure-pages@v5
53-
# - name: Build with Jekyll
54-
# # Outputs to the './_site' directory by default
55-
# run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
56-
# env:
57-
# JEKYLL_ENV: production
58-
# - name: Upload artifact
59-
# # Automatically uploads an artifact from the './_site' directory by default
60-
# uses: actions/upload-pages-artifact@v3
61-
62-
# # Deployment job
63-
# deploy:
64-
# environment:
65-
# name: github-pages
66-
# url: ${{ steps.deployment.outputs.page_url }}
67-
# runs-on: ubuntu-latest
68-
# needs: build
69-
# steps:
70-
# - name: Deploy to GitHub Pages
1+
name: Deploy Jekyll site to Pages
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Ruby
25+
uses: ruby/setup-ruby@v1
26+
with:
27+
ruby-version: '3.2'
28+
bundler-cache: true
29+
30+
- name: Setup Pages
31+
id: pages
32+
uses: actions/configure-pages@v4
33+
34+
- name: Build with Jekyll
35+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
36+
env:
37+
JEKYLL_ENV: production
38+
39+
- name: Upload artifact
40+
uses: actions/upload-pages-artifact@v3
41+
42+
deploy:
43+
environment:
44+
name: github-pages
45+
url: ${{ steps.deployment.outputs.page_url }}
46+
runs-on: ubuntu-latest
47+
needs: build
48+
steps:
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v4
7152
# id: deployment
7253
# uses: actions/deploy-pages@v4
7354

0 commit comments

Comments
 (0)