From f5dec4b9690193aa0eba8c9705ae01a0238ecf56 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 10 Apr 2021 01:28:10 +0300 Subject: workflows/jekyll: merge jobs, Bundler caching --- .github/workflows/jekyll.yml | 37 +++++++++++++------------------------ 1 file changed, 13 insertions(+), 24 deletions(-) (limited to '.github') diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml index cd1aa73..4714bd1 100644 --- a/.github/workflows/jekyll.yml +++ b/.github/workflows/jekyll.yml @@ -6,9 +6,17 @@ on: workflow_dispatch: jobs: - bundler: + build: runs-on: ubuntu-18.04 - name: Bundler + strategy: + matrix: + version: [Gemfile, latest] + include: + - {version: Gemfile, gemfile: Gemfile} + - {version: latest, gemfile: .ci/Gemfile} + name: 'Build / ${{ matrix.version }}' + env: + BUNDLE_GEMFILE: '${{ matrix.gemfile }}' steps: - name: Checkout uses: actions/checkout@v2 @@ -16,30 +24,12 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: '2.6' - - name: Install dependencies - run: bundle install --jobs=3 --retry=3 + bundler-cache: true - name: jekyll build run: bundle exec jekyll build --drafts - github_pages: - runs-on: ubuntu-18.04 - name: github-pages - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: '2.6' - - name: Install dependencies - run: | - rm -f -- Gemfile Gemfile.lock - gem install github-pages - - name: jekyll build - run: jekyll build - public: - needs: [github_pages] + needs: [build] runs-on: ubuntu-18.04 name: Publish steps: @@ -49,8 +39,7 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: '2.6' - - name: Install dependencies - run: bundle install --jobs=3 --retry=3 + bundler-cache: true - name: Build run: bundle exec jekyll build --baseurl /jekyll-theme - name: Publish -- cgit v1.2.3