Skip to content

Commit 311ce3d

Browse files
Update jekyll-gh-pages.yml
1 parent e80a709 commit 311ce3d

File tree

1 file changed

+24
-13
lines changed

1 file changed

+24
-13
lines changed
Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
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+
16
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
2-
name: Deploy Jekyll with GitHub Pages dependencies preinstalled
7+
name: Deploy Jekyll site to Pages
38

49
on:
5-
# Runs on pushes targeting the default branch
610
push:
711
branches: ["gh-pages"]
812

@@ -15,28 +19,35 @@ permissions:
1519
pages: write
1620
id-token: write
1721

18-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
22+
# Allow one concurrent deployment
2023
concurrency:
2124
group: "pages"
22-
cancel-in-progress: false
25+
cancel-in-progress: true
2326

2427
jobs:
2528
# Build job
2629
build:
2730
runs-on: ubuntu-latest
2831
steps:
2932
- name: Checkout
30-
uses: actions/checkout@v4
33+
uses: actions/checkout@v3
34+
- name: Setup Ruby
35+
uses: ruby/setup-ruby@v1
36+
with:
37+
ruby-version: '3.1' # Not needed with a .ruby-version file
38+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
39+
cache-version: 0 # Increment this number if you need to re-download cached gems
3140
- name: Setup Pages
32-
uses: actions/configure-pages@v4
41+
id: pages
42+
uses: actions/configure-pages@v3
3343
- name: Build with Jekyll
34-
uses: actions/jekyll-build-pages@v1
35-
with:
36-
source: ./
37-
destination: ./_site
44+
# Outputs to the './_site' directory by default
45+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
46+
env:
47+
JEKYLL_ENV: production
3848
- name: Upload artifact
39-
uses: actions/upload-pages-artifact@v3
49+
# Automatically uploads an artifact from the './_site' directory by default
50+
uses: actions/upload-pages-artifact@v1
4051

4152
# Deployment job
4253
deploy:
@@ -48,4 +59,4 @@ jobs:
4859
steps:
4960
- name: Deploy to GitHub Pages
5061
id: deployment
51-
uses: actions/deploy-pages@v4
62+
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)