stages:
  - check
  - build
  - pages

check:
  stage: check
  image: node:7.8.0
  services:
  variables:
    NODE_ENV: development
  before_script:
    - node --version
    - npm --version
    - npm install -g eslint
  script:
    - eslint gulpfile.js
  cache:
    untracked: true
    paths:
      - node_modules
  except:
    - tags

build:
  stage: build
  image: node:7.8.0
  services:
  variables:
    NODE_ENV: production
  before_script:
    - node --version
    - npm --version
    - npm install -g gulp-cli
    - npm install
  script:
    - gulp
  cache:
    untracked: true
    paths:
      - node_modules
  artifacts:
    untracked: true
    paths:
      - dst
  except:
    - tags

pages:
  stage: pages
  image: node:7.8.0
  services:
  variables:
    NODE_ENV: production
  before_script:
    - mkdir -p public/css
    - rm doc/css/styr.css
  script:
    - cp -R doc/* public/
    - cp dst/styr.min.css public/css/styr.css
  artifacts:
    untracked: true
    paths:
      - public
  only:
    - master

stages:
  - check
  - build
  - pages

check:
  stage: check
  image: node:7.8.0
  services:
  variables:
    NODE_ENV: development
  before_script:
    - node --version
    - npm --version
    - npm install -g eslint
  script:
    - eslint gulpfile.js
  cache:
    untracked: true
    paths:
      - node_modules
  except:
    - tags

build:
  stage: build
  image: node:7.8.0
  services:
  variables:
    NODE_ENV: production
  before_script:
    - node --version
    - npm --version
    - npm install -g gulp-cli
    - npm install --dev
    - npm install
  script:
    - gulp
  cache:
    untracked: true
    paths:
      - node_modules
  artifacts:
    untracked: true
    paths:
      - dst
  except:
    - tags

pages:
  stage: pages
  image: node:7.8.0
  services:
  variables:
    NODE_ENV: production
  before_script:
    - mkdir -p public/css
    - rm doc/css/styr.css
  script:
    - cp -R doc/* public/
    - cp dst/styr.min.css public/css/styr.css
  artifacts:
    untracked: true
    paths:
      - public
  only:
    - master

Add --only=dev step at build
Add --only=dev step at build
