Skip to content
Snippets Groups Projects
.gitlab-ci.yml 579 B
Newer Older
David Hoksza's avatar
David Hoksza committed
image: node

before_script:


stages:
  - build
  - deploy

build:
  stage: build

  script:
    - npm install
    - npm run build

deploy:
  stage: deploy
  only:
    - master

  script:
    - eval $(ssh-agent -s)
    - ssh-add <(echo "$SSH_PRIVATE_KEY")
    - mkdir -p ~/.ssh
    - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'

    - npm install
    - npm run build
    - echo "mkdir plugins-www/guide" | sftp -P 8022 gitlab-ci@10.240.6.160
    - echo "put dist/plugin.js plugins-www/guide/" | sftp -P 8022 gitlab-ci@10.240.6.160