name: Build

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - uses: actions/cache@v1
      with:
        path: vendor/bundle
        key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
        restore-keys: |
          ${{ runner.os }}-gems-
    - name: Set up Ruby 2.6
      uses: actions/setup-ruby@v1
      with:
        ruby-version: 2.6.x
    - name: Bundle install
      run: |
        bundle config path vendor/bundle
        bundle install --jobs 4 --retry 3
    - name: Build with Jekyll
      run: |
        bundle exec jekyll build

name: Build

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - uses: actions/cache@v1
      with:
        path: vendor/bundle
        key: ${{ runner.os }}-gems-${{ hashFiles('Gemfile') }}
        restore-keys: |
          ${{ runner.os }}-gems-
    - name: Set up Ruby 2.6
      uses: actions/setup-ruby@v1
      with:
        ruby-version: 2.6.x
    - name: Bundle install
      run: |
        bundle config path vendor/bundle
        bundle install --jobs 4 --retry 3
    - name: Build with Jekyll
      run: |
        bundle exec jekyll build

Use cache key of Gemfile
Use cache key of Gemfile

Failure if Gemfile.lock is used:

    ##[error]The template is not valid.
    hashFiles('/home/runner/work/pixyll/pixyll/**/Gemfile.lock') failed.
    Search pattern
    '/home/runner/work/pixyll/pixyll/**/Gemfile.lock' doesn't match any
    file under '/home/runner/work/pixyll/pixyll'
