From 56ef270e2745af536fb5fc8db4854bdd57ba2ce9 Mon Sep 17 00:00:00 2001 From: Sesh Sadasivam Date: Sun, 16 May 2021 04:43:23 -0400 Subject: [PATCH] Use official Ruby setup GH action (#8614) Merge pull request 8614 --- .github/workflows/ci.yml | 2 +- .github/workflows/docs.yml | 19 ++++++------------- .github/workflows/third-party.yml | 22 +++++++--------------- 3 files changed, 14 insertions(+), 29 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 51cd1b63..6769f529 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,4 +59,4 @@ jobs: - name: Download released earth run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.5.7/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'" - name: Execute tests - run: earthly --build-arg RUBY=${{ matrix.ruby_version }} +style-check \ No newline at end of file + run: earthly --build-arg RUBY=${{ matrix.ruby_version }} +style-check diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a87427d2..dc082c93 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,23 +12,16 @@ jobs: deploy_docs: if: "!contains(github.event.commits[0].message, '[ci skip]')" runs-on: 'ubuntu-latest' + env: + BUNDLE_PATH: "vendor/bundle" + BUNDLE_JOBS: 4 + BUNDLE_RETRY: 3 steps: - uses: actions/checkout@v2 - - uses: actions/setup-ruby@v1 + - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ env.RUBY_VERSION }} - - name: Setup cache for Bundler - id: cache - uses: actions/cache@v2.1.5 - with: - path: vendor/bundle - key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} - restore-keys: | - ${{ runner.os }}-gems- - - name: Set up dependencies - run: | - bundle install --path=vendor/bundle --jobs 4 --retry 3 - bundle clean + bundler-cache: true - name: Clone target branch run: | REMOTE_BRANCH="${REMOTE_BRANCH:-gh-pages}" diff --git a/.github/workflows/third-party.yml b/.github/workflows/third-party.yml index 247a5fbd..1312af17 100644 --- a/.github/workflows/third-party.yml +++ b/.github/workflows/third-party.yml @@ -11,6 +11,11 @@ jobs: build_n_profile: if: "!contains(github.event.commits[0].message, '[ci skip]')" runs-on: 'ubuntu-latest' + env: + BUNDLE_GEMFILE: "sandbox/Gemfile" + BUNDLE_PATH: "vendor/bundle" + BUNDLE_JOBS: 4 + BUNDLE_RETRY: 3 steps: - name: Checkout Jekyll uses: actions/checkout@v2 @@ -23,23 +28,10 @@ jobs: repository: ashmaroli/tomjoht.github.io path: sandbox - name: Set up Ruby - uses: actions/setup-ruby@v1 + uses: ruby/setup-ruby@v1 with: ruby-version: 2.7 - - name: Set up Dependencies Cache - uses: actions/cache@v2.1.5 - with: - path: sandbox/vendor/bundle - key: ubuntu-latest-gems-${{ hashFiles('**/Gemfile.lock') }} - restore-keys: | - ubuntu-latest-gems- - - name: Set up Dependencies - run: | - gem update --system --no-document - gem update bundler --no-document - bundle config gemfile sandbox/Gemfile - bundle config path vendor/bundle - bundle install --jobs 4 --retry 3 + bundler-cache: true - name: Run Jekyll Build 3 times run: | bundle exec jekyll build -s sandbox -d sandbox/_site --trace