name: Build

on: [push]

jobs:

  build:

    name: Build 🛠

    runs-on: ubuntu-18.04

    steps:
      - uses: actions/checkout@v2

      - name: Setup Node
        uses: actions/setup-node@v1
        with:
          node-version: '10.16'

      - name: Install Node packages
        run: yarn install --production --pure-lockfile --non-interactive

      - name: Build assets for deployment
        run: yarn run deploy

      - name: Set up Ruby 2.6
        uses: actions/setup-ruby@v1
        with:
          ruby-version: 2.6.x

      - name: Bundle install
        run: |
          gem install bundler
          bundle install --jobs 4 --retry 3

      - name: Jekyll build
        run: jekyll build --config "_config.yml,_config.prod.yml"

      - name: CSS linting with stylelint
        uses: actions-hub/stylelint@v1.1.2
        env:
          PATTERN: 'src/css/*.css'

      - name: JS linting with eslint
        run: yarn run lint:js

      - name: Site testing with html-proofer
        uses: chabad360/htmlproofer@master
        with:
          directory: './_site'
          arguments: '--empty_alt_ignore --http-status-ignore 999'

name: Build

on: [push]

jobs:

  build:

    name: Build & test 🛠

    runs-on: ubuntu-18.04

    steps:
      - uses: actions/checkout@v2

      - name: Setup Node
        uses: actions/setup-node@v1
        with:
          node-version: '10.16'

      - name: Install Node packages
        run: yarn install --production --pure-lockfile --non-interactive

      - name: Build assets for deployment
        run: yarn run deploy

      - name: Set up Ruby 2.6
        uses: actions/setup-ruby@v1
        with:
          ruby-version: 2.6.x

      - name: Bundle install
        run: |
          gem install bundler
          bundle install --jobs 4 --retry 3

      - name: Jekyll build
        run: jekyll build --config "_config.yml,_config.prod.yml"

      - name: CSS linting with stylelint
        run: yarn run lint:css

      - name: JS linting with eslint
        run: yarn run lint:js

      - name: Site testing with html-proofer
        uses: chabad360/htmlproofer@master
        with:
          directory: './_site'
          arguments: '--empty_alt_ignore --http-status-ignore 999'

Use own npm scripts for linting
Use own npm scripts for linting
