Skip to content

Commit f911504

Browse files
committed
Update to GH jekyll
1 parent 48f14c6 commit f911504

File tree

1 file changed

+53
-31
lines changed

1 file changed

+53
-31
lines changed

.github/workflows/jekyll.yaml

Lines changed: 53 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,65 @@
1-
name: Build and deploy Jekyll site
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
28

39
on:
10+
# Runs on pushes targeting the default branch
411
push:
5-
branches: [ main ]
6-
pull_request:
7-
branches: [ main ]
12+
branches: ["main"]
13+
814
# Allows you to run this workflow manually from the Actions tab
915
workflow_dispatch:
1016

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+
1129
jobs:
30+
# Build job
1231
build:
1332
runs-on: ubuntu-latest
1433
steps:
15-
- uses: actions/checkout@v4
16-
17-
- name: Set up Ruby
18-
uses: ruby/setup-ruby@v1
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
- name: Setup Ruby
37+
# https://github.com/ruby/setup-ruby/releases/tag/v1.207.0
38+
uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4
1939
with:
20-
ruby-version: '3.2' # You can specify your Ruby version here
21-
bundler-cache: true # This will use a cached version of your gems
22-
23-
- name: Configure Bundler
24-
run: |
25-
bundle config set --local path './vendor/bundle'
26-
bundle config build.eventmachine --with-ldflags="-Wl,-undefined,dynamic_lookup"
27-
28-
- name: Install dependencies
29-
run: bundle install
30-
31-
- name: Build site
32-
run: bundle exec jekyll build
33-
34-
- name: Test site
35-
run: bundle exec jekyll serve --incremental --detach
36-
37-
# Optional: Add a step to deploy to GitHub Pages
40+
ruby-version: '3.1' # Not needed with a .ruby-version file
41+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
42+
cache-version: 0 # Increment this number if you need to re-download cached gems
43+
- name: Setup Pages
44+
id: pages
45+
uses: actions/configure-pages@v5
46+
- name: Build with Jekyll
47+
# Outputs to the './_site' directory by default
48+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
49+
env:
50+
JEKYLL_ENV: production
51+
- name: Upload artifact
52+
# Automatically uploads an artifact from the './_site' directory by default
53+
uses: actions/upload-pages-artifact@v3
54+
55+
# Deployment job
56+
deploy:
57+
environment:
58+
name: github-pages
59+
url: ${{ steps.deployment.outputs.page_url }}
60+
runs-on: ubuntu-latest
61+
needs: build
62+
steps:
3863
- name: Deploy to GitHub Pages
39-
if: github.ref == 'refs/heads/main'
40-
uses: peaceiris/actions-gh-pages@v3
41-
with:
42-
github_token: ${{ secrets.GITHUB_TOKEN }}
43-
publish_dir: ./_site
64+
id: deployment
65+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)