Skip to content

Commit 8a5c5ea

Browse files
committed
Fix GitHub Pages deployment workflow
1 parent 9cf4b12 commit 8a5c5ea

File tree

1 file changed

+16
-22
lines changed

1 file changed

+16
-22
lines changed

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

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,48 @@
1-
name: Deploy to GitHub Pages (ipcrypt-std.github.io)
1+
name: Deploy Jekyll site to GitHub Pages
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: ["main"]
66
workflow_dispatch:
77

8+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
89
permissions:
910
contents: read
1011
pages: write
1112
id-token: write
1213

14+
# Allow only one concurrent deployment
1315
concurrency:
1416
group: "pages"
15-
cancel-in-progress: false
17+
cancel-in-progress: true
1618

1719
jobs:
1820
# Build job
1921
build:
2022
runs-on: ubuntu-latest
23+
defaults:
24+
run:
25+
working-directory: ./www
2126
steps:
2227
- name: Checkout
2328
uses: actions/checkout@v4
24-
25-
- name: Setup Pages
26-
uses: actions/configure-pages@v4
27-
2829
- name: Setup Ruby
2930
uses: ruby/setup-ruby@v1
3031
with:
31-
ruby-version: '3.3'
32-
bundler-cache: false
33-
working-directory: www
34-
32+
ruby-version: '3.2'
33+
bundler-cache: true
34+
working-directory: ./www
35+
- name: Setup Pages
36+
id: pages
37+
uses: actions/configure-pages@v4
3538
- name: Build with Jekyll
36-
run: |
37-
cd www
38-
gem update --system
39-
gem install bundler
40-
bundle update --bundler
41-
bundle install
42-
# Build Jekyll site with baseurl set to empty string
43-
JEKYLL_ENV=production bundle exec jekyll build --baseurl=""
39+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
4440
env:
4541
JEKYLL_ENV: production
46-
4742
- name: Upload artifact
4843
uses: actions/upload-pages-artifact@v3
4944
with:
50-
# Deploy the _site directory to the root of the GitHub Pages site
51-
path: www/_site
45+
path: ./www/_site
5246

5347
# Deployment job
5448
deploy:

0 commit comments

Comments
 (0)