sudo: false
# Install the apt prerequisites
addons:
  apt:
    packages:
      - ruby
      - ruby-dev
      - wget
      - libcurl4-openssl-dev # required to avoid SSL errors with htmlproofer
env:
  global:
  - NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer

# We need asciidoctor and exact hugo version
before_install:
  - gem install asciidoctor -v 2.0.10
  - gem install html-proofer -v 3.13.0
  - wget https://github.com/gohugoio/hugo/releases/download/v0.69.0/hugo_0.69.0_Linux-64bit.tar.gz
  - tar -xzvf hugo_0.69.0_Linux-64bit.tar.gz

# Build the website
script:
  - ./hugo
  - htmlproofer ./public --external_only --only_4xx --url-ignore "/www.digikey.com/"
