image: node:alpine

stages:
  - build
  - deploy

build:
  stage: build
  script:
    - npm ci
    - npm run lint
    - npm run build
  only:
    - master
    - tags
  artifacts:
    paths:
      - build/
      - lambda/

deploy:
  stage: deploy
  environment:
    name: production
    url: https://iiro.fi
  before_script:
    - npm i -g netlify-cli@^2
  script:
    - netlify deploy -d build -f lambda --prod -m $CI_COMMIT_TAG
  only:
    - tags

image: node:alpine

stages:
  - build
  - deploy

build:
  stage: build
  script:
    - npm ci
    - npm run lint
    - npm run build
  only:
    - master
  artifacts:
    paths:
      - build/
      - lambda/

deploy:
  stage: deploy
  environment:
    name: production
    url: https://iiro.fi
  before_script:
    - npm i -g netlify-cli@^2
  script:
    - netlify deploy -d build -f lambda --prod -m $CI_COMMIT_TITLE
  only:
    - master

Use commit title as deploy message and ignore tags
ci: Use commit title as deploy message and ignore tags
