Simple GitLab CI pipeline for Gatsby project

The .gitlab-ci.yml file should contain:

stages:
  - build
  - test

build website:
  image: node
  stage: build
  script:
    - npm install
    - npm install -g gatsby-cli
    - gatsby build
  artifacts:
    paths:
      - ./public

test artifact:
  image: alpine
  stage: test
  script:
    - grep -q "Gatsby" ./public/index.html

test website:
  image: node
  stage: test
  script:
    - npm install
    - npm install -g gatsby-cli
    - gatsby serve &
    - sleep 5
    - curl "http://localhost:9000" | tac | tac |  grep -q "Gatsby"