Skip to content

Commit 5d91b80

Browse files
committed
workflows]
1 parent f4bbf0b commit 5d91b80

File tree

2 files changed

+75
-14
lines changed

2 files changed

+75
-14
lines changed

.github/workflows/ci.yml

Lines changed: 72 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,84 @@
1-
name: CI
2-
31
on:
42
push:
5-
branches: ["main"]
3+
branches:
4+
- main
65
pull_request:
7-
branches: ["main"]
8-
6+
branches:
7+
- main
8+
9+
name: CI
10+
911
jobs:
10-
# Build job
11-
build:
12+
jekyll-build:
13+
name: Build (jekyll gem)
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
jekyll-version: [3.9, 4.3]
18+
os: [ubuntu-latest, macos-latest, windows-latest]
19+
ruby-version: ["3.1", "3.2", "3.3"]
20+
runs-on: ${{ matrix.os }}
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Setup Ruby ${{ matrix.ruby-version }}
24+
uses: ruby/setup-ruby@v1
25+
with:
26+
ruby-version: ${{ matrix.ruby-version }}
27+
bundler-cache: false
28+
- name: Bundle Install (Jekyll ${{ matrix.jekyll-version }})
29+
run: bundle install
30+
env:
31+
BUNDLE_GEMFILE: fixtures/Gemfile-jekyll-${{ matrix.jekyll-version }}
32+
- name: Init Search
33+
run: bundle exec rake search:init
34+
env:
35+
BUNDLE_GEMFILE: fixtures/Gemfile-jekyll-${{ matrix.jekyll-version }}
36+
- name: Build Site
37+
run: bundle exec jekyll build
38+
env:
39+
BUNDLE_GEMFILE: fixtures/Gemfile-jekyll-${{ matrix.jekyll-version }}
40+
41+
github-pages-build:
42+
name: Build (github-pages gem)
1243
runs-on: ubuntu-latest
1344
steps:
14-
- name: Checkout
15-
uses: actions/checkout@v4
45+
- uses: actions/checkout@v4
1646
- name: Setup Ruby
1747
uses: ruby/setup-ruby@v1
1848
with:
19-
ruby-version: '3.3' # Not needed with a .ruby-version file
49+
ruby-version: "3.3"
50+
bundler-cache: false
51+
- name: Bundle Install
52+
run: bundle install
53+
env:
54+
BUNDLE_GEMFILE: fixtures/Gemfile-github-pages
55+
- name: Build Site
56+
run: bundle exec jekyll build
57+
env:
58+
BUNDLE_GEMFILE: fixtures/Gemfile-github-pages
59+
60+
validate:
61+
name: Validate HTML
62+
strategy:
63+
fail-fast: false
64+
matrix:
65+
ruby-version: ["3.3"]
66+
runs-on: ubuntu-latest
67+
68+
steps:
69+
- uses: actions/checkout@v4
70+
- name: Setup Ruby ${{ matrix.ruby-version }}
71+
uses: ruby/setup-ruby@v1
72+
with:
73+
ruby-version: ${{ matrix.ruby-version }}
2074
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
2175
cache-version: 0 # Increment this number if you need to re-download cached gems
22-
- name: Build with Jekyll
76+
- name: Cache HTMLProofer
77+
id: cache-htmlproofer
78+
uses: actions/cache@v3
79+
with:
80+
path: tmp/.htmlproofer
81+
key: ${{ runner.os }}-htmlproofer
82+
- name: Build Site
2383
run: bundle exec jekyll build
84+

.github/workflows/pages.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Checkout
3333
uses: actions/checkout@v4
3434
- name: Setup Ruby
35-
uses: ruby/setup-ruby@v1.196.0
35+
uses: ruby/setup-ruby@v1
3636
with:
3737
ruby-version: '3.1.3' # Not needed with a .ruby-version file
3838
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
@@ -47,7 +47,7 @@ jobs:
4747
JEKYLL_ENV: production
4848
- name: Upload artifact
4949
# Automatically uploads an artifact from the './_site' directory by default
50-
uses: actions/upload-pages-artifact@v3
50+
uses: actions/upload-pages-artifact@v2
5151

5252
# Deployment job
5353
deploy:
@@ -59,4 +59,4 @@ jobs:
5959
steps:
6060
- name: Deploy to GitHub Pages
6161
id: deployment
62-
uses: actions/deploy-pages@v4
62+
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)