ct-martin/rimg

View on GitHub
.gitlab-ci.yml

Summary

Maintainability
Test Coverage
stages:
  - test
  - deploy

variables:
  APP_NAME: rimg

cache:
  key: ${CI_COMMIT_REF_SLUG}
  paths:
    - .npm/

test:
  stage: test
  image: node:latest
  only:
    changes:
      - "**/*.ts"
      - "**/*.js"
      - "**/*.json"

  before_script:
    - npm ci --cache .npm --prefer-offline
  
  script:
   - npm test

deploy:
  stage: deploy
  image: ilyasemenov/gitlab-ci-git-push
  only:
    refs:
      - master
    changes:
      - "**/*.ts"
      - "**/*.js"
      - "**/*.json"
  script:
    - git-push ssh://dokku@$REMOTE_HOST/$APP_NAME