Skip to content

Commit

Permalink
Merge pull request #194 from rspec/cache-build
Browse files Browse the repository at this point in the history
Setup cache
  • Loading branch information
JonRowe authored Feb 5, 2024
2 parents 77a043d + 50e8771 commit 7289973
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,28 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup bundler cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-bundler-${{ hashFiles('Gemfile.lock') }}
path: .bundle/gems
- name: Setup build cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-build
path: __build
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
- name: Install dependencies
run: bundle install
run: |
bundle config set --local path '.bundle/gems'
bundle install
- name: Build with Middleman
run: |
mkdir __build
BUILD_OUTPUT="__build" middleman build
mkdir -p __build
BUILD_OUTPUT="__build" bundle exec middleman build
- name: Generate HTML Preview
id: html_preview
uses: pavi2410/html-preview-action@v2
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/middleman_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,21 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
- name: Setup bundler cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-bundler-${{ hashFiles('Gemfile.lock') }}
path: .bundle/gems
- name: Setup build cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-source-build
path: __source_build
- name: Install dependencies
run: bundle install
- name: Build with Middleman
run: |
mkdir __source_build
mkdir -p __source_build
BUILD_OUTPUT="__source_build" middleman build
- name: Set CNAME
run: echo "rspec.info" > CNAME
Expand Down

0 comments on commit 7289973

Please sign in to comment.