image: node:14.17.1-slim

stages:
  - test
  - build

lint:
  stage: test
  tags:
    - cache
  script: 
    - npm install
    - npm run lint
  cache:
    key:
      files:
        - package.json
    paths:
      - node_modules

pages:
  stage: build
  tags:
    - cache
  script:
    - npm run build
    - mv build public
  artifacts:
    paths:
      - public
  cache:
    key:
      files:
        - package.json
    paths:
      - node_modules
  only:
    - master
