Skip to content

Setup cache #194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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