Skip to content

Commit a45639c

Browse files
committed
Setup cache
1 parent 77a043d commit a45639c

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

Diff for: .github/workflows/build.yml

+14-2
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,28 @@ jobs:
1818
steps:
1919
- name: Checkout
2020
uses: actions/checkout@v4
21+
- name: Setup bundler cache
22+
uses: actions/cache@v3
23+
with:
24+
key: ${{ runner.os }}-bundler-${{ hashFiles('Gemfile.lock') }}
25+
path: .bundle/gems
26+
- name: Setup build cache
27+
uses: actions/cache@v3
28+
with:
29+
key: ${{ runner.os }}-build
30+
path: __build
2131
- name: Setup Ruby
2232
uses: ruby/setup-ruby@v1
2333
with:
2434
ruby-version: '3.3'
2535
- name: Install dependencies
26-
run: bundle install
36+
run: |
37+
bundle config set --local path '.bundle/gems'
38+
bundle install
2739
- name: Build with Middleman
2840
run: |
2941
mkdir __build
30-
BUILD_OUTPUT="__build" middleman build
42+
BUILD_OUTPUT="__build" bundle exec middleman build
3143
- name: Generate HTML Preview
3244
id: html_preview
3345
uses: pavi2410/html-preview-action@v2

0 commit comments

Comments
 (0)