Skip to content

Commit 9d26a97

Browse files
committed
fix: deploy
1 parent fff9d72 commit 9d26a97

File tree

1 file changed

+46
-23
lines changed

1 file changed

+46
-23
lines changed

.github/workflows/jekyll.yml

Lines changed: 46 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,59 @@
1-
name: Build and Deploy Jekyll Site
1+
name: Deploy Jekyll site to Pages
22

33
on:
4+
# Runs on pushes targeting the default branch
45
push:
5-
branches: [ main, master ]
6-
pull_request:
7-
branches: [ main, master ]
6+
branches: ["main"]
7+
8+
# Allows you to run this workflow manually from the Actions tab
89
workflow_dispatch:
910

11+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
18+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
19+
concurrency:
20+
group: "pages"
21+
cancel-in-progress: false
22+
1023
jobs:
24+
# Build job
1125
build:
1226
runs-on: ubuntu-latest
13-
permissions: write-all
14-
1527
steps:
16-
- name: Checkout code
17-
uses: actions/checkout@v3
18-
28+
- name: Checkout
29+
uses: actions/checkout@v4
1930
- name: Setup Ruby
20-
uses: ruby/setup-ruby@v1
31+
# https://github.com/ruby/setup-ruby/releases/tag/v1.207.0
32+
uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4
2133
with:
22-
ruby-version: '3.0'
23-
bundler-cache: true
24-
25-
- name: Install dependencies
26-
run: bundle install
27-
28-
- name: Build site
29-
run: bundle exec jekyll build
34+
ruby-version: '3.1' # Not needed with a .ruby-version file
35+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
36+
cache-version: 0 # Increment this number if you need to re-download cached gems
37+
- name: Setup Pages
38+
id: pages
39+
uses: actions/configure-pages@v5
40+
- name: Build with Jekyll
41+
# Outputs to the './_site' directory by default
42+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
43+
env:
44+
JEKYLL_ENV: production
45+
- name: Upload artifact
46+
# Automatically uploads an artifact from the './_site' directory by default
47+
uses: actions/upload-pages-artifact@v3
3048

49+
# Deployment job
50+
deploy:
51+
environment:
52+
name: github-pages
53+
url: ${{ steps.deployment.outputs.page_url }}
54+
runs-on: ubuntu-latest
55+
needs: build
56+
steps:
3157
- name: Deploy to GitHub Pages
32-
uses: JamesIves/github-pages-deploy-action@v4
33-
if: success() && github.event_name != 'pull_request'
34-
with:
35-
folder: _site
36-
branch: gh-pages
58+
id: deployment
59+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)