---

name: Jekyll Build
# yamllint disable-line rule:truthy
on: [push, pull_request]

jobs:
  jekyll:
    name: Build and deploy Jekyll site
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Cache gems
        uses: actions/cache@v1
        with:
          path: vendor/bundle
          key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
          restore-keys: ${{ runner.os }}-gem-

      # TODO: Cache $BUILD_DIR/tmp/.htmlproofer - for some value of build dir.

      - name: Build
        uses: jerryjvl/jekyll-build-action@v1
        env:
          JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          # Speeds up installation of html-proofer.
          NOKOGIRI_USE_SYSTEM_LIBRARIES: true

      - name: Check HTML
        uses: chabad360/htmlproofer@master
        with:
          # The directory to scan.
          directory: "./_site"
          # The arguments to pass to HTMLProofer.
          # Unsure how to enable alt tags for teaser images.
          # Treat urls with this domain as internal urls.
          arguments: "--check-favicon --check-html \
--empty-alt-ignore --internal-domains proinsias.github.io --only-4xx \
--url-ignore \"#,/web.archive.org/\" \
--typhoeus-config '{ \"connecttimeout\": 30, \"timeout\": 30 }'"

---

name: Jekyll Build
# yamllint disable-line rule:truthy
on: [push, pull_request]

jobs:
  jekyll:
    name: Build and deploy Jekyll site
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Cache gems
        uses: actions/cache@v1
        with:
          path: vendor/bundle
          key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
          restore-keys: ${{ runner.os }}-gem-

      # TODO: Cache $BUILD_DIR/tmp/.htmlproofer - for some value of build dir.

      - name: Build
        uses: jerryjvl/jekyll-build-action@v1
        env:
          JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          # Speeds up installation of html-proofer.
          NOKOGIRI_USE_SYSTEM_LIBRARIES: true

      - name: Check HTML
        uses: chabad360/htmlproofer@master
        with:
          # The directory to scan.
          directory: "./_site"
          # The arguments to pass to HTMLProofer.
          # Unsure how to enable alt tags for teaser images.
          # Treat urls with this domain as internal urls.
          arguments: "--check-favicon --check-html \
--empty-alt-ignore --internal-domains proinsias.github.io --only-4xx \
--url-ignore \"#,/web.archive.org/,/twitter.com/,/doi.org/\" \
--typhoeus-config '{ \"connecttimeout\": 30, \"timeout\": 30 }'"

Fix htmlproofer errors - update github action too
Fix htmlproofer errors - update github action too
