diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 88c06da64..81882198b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/.github/workflows/middleman_deploy.yml b/.github/workflows/middleman_deploy.yml index 22e51a093..829efd17e 100644 --- a/.github/workflows/middleman_deploy.yml +++ b/.github/workflows/middleman_deploy.yml @@ -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