.gitlab-ci.yml

cache: &global_cache
  key: develop
  paths:
    - node_modules/

stages:
  - init_env
  - build
  - deploy

init_env:
  stage: init_env
  script:
    - npm install
  allow_failure: false
  only:
    refs:
      - develop
      - crm-debug

 build:
   stage: build
   script:
     - npm run build
   artifacts:
     paths:
       - dist/
     expire_in: 1 week
   allow_failure: false
   only:
     refs:
      - develop
build-debug:
  stage: build
  script:
    - npm run build:no-auth
  artifacts:
    paths:
      - dist/
    expire_in: 1 week
  allow_failure: false
  only:
    refs:
      - crm-debug

 deploy:
   stage: deploy
   script:
     - npm run deploy
     - sudo scp dist/index.html [email protected]:/data/web/
   allow_failure: false
   only:
     refs:
       - bussess

 deploy-test:
   stage: deploy
   script:
     - npm run deploy:test
     - sudo scp dist/index.html [email protected]:/data/web/
   allow_failure: false
   only:
     refs:
       - test-branch

 deploy:
   stage: deploy
  script:
     - npm run deploy
     - sudo scp dist/index.html [email protected]:/data/web/
   allow_failure: false
   only:
     refs:
      - develop

deploy-debug:
  stage: deploy
  script:
    - npm run deploy:no-auth
    - sudo cp dist/index.html /home/biv-apps/crm-debug-bi-web/
  allow_failure: false
  only:
    refs:
      - crm-debug

你可能感兴趣的:(前端)