image: node:alpine

stages:
  - install
  - test
  - build
  - deploy

"Install":
  stage: install
  script:
    - npm ci
  artifacts:
    expire_in: 1 day
    paths:
      - node_modules
  cache:
    paths:
      - node_modules

"Lint":
  stage: test
  script:
    - npm run lint

"Build Site":
  stage: build
  script:
    - npm run build:site
  artifacts:
    paths:
      - public

"Build Lambda":
  stage: build
  script:
    - npm run build:lambda
  artifacts:
    paths:
      - lambda

"Deploy To Netlify":
  stage: deploy
  before_script:
    - apk add --no-cache curl tar
    - curl -sL https://cli.netlify.com/download/latest/linux | tar xz
  script:
    - ./netlifyctl -A $NETLIFY_ACCESS_TOKEN deploy
  only:
    - tags

image: node:alpine

stages:
  - install
  - test
  - build
  - deploy

"Install":
  stage: install
  script:
    - npm ci
  artifacts:
    expire_in: 1 day
    paths:
      - node_modules
  cache:
    paths:
      - node_modules

"Lint":
  stage: test
  script:
    - npm run lint

"Build Site":
  stage: build
  script:
    - npm run build:site
  artifacts:
    paths:
      - public

"Build Lambda":
  stage: build
  script:
    - npm run build:lambda
  artifacts:
    paths:
      - lambda

"Deploy To Netlify":
  stage: deploy
  before_script:
    - apk add --no-cache curl tar
    - curl -sL https://cli.netlify.com/download/latest/linux | tar xz
  script:
    - ./netlifyctl deploy -A $NETLIFY_ACCESS_TOKEN -m $CI_COMMIT_TAG
  only:
    - tags

Add commit tag as the message for the deploy title
Add commit tag as the message for the deploy title
