明树Git Lab

Commit bbc909a4 authored by Administrator's avatar Administrator

Add new file

parent 780a7ee2
Pipeline #103804 passed with stage
in 11 seconds
#-----------------------------------------------gzb-------------------------------------------------------
# 自动部署到gzb环境
stages:
- package
- deploy
package to gzb:
stage: package
image: lgatica/openssh-client
script:
- eval $(ssh-agent -s)
- mkdir -p ~/.ssh
- echo "$SSH_PRIVATE_KEY_CLOUD" | tr -d '\r' > ~/.ssh/id_rsa
- chmod 700 ~/.ssh/id_rsa
- eval "$(ssh-agent -s)"
- ssh-add ~/.ssh/id_rsa
- echo -e "Host *\n\tStrictHostKeyChecking no\n\nHost *\n\tPubkeyAcceptedKeyTypes=+ssh-dss\n\n" > ~/.ssh/config
- ssh-add -l
- ssh root@10.40.8.9 "
cd /srv/jt_front &&
git checkout ./package.json &&
git pull &&
npm install --registry https://registry.npmmirror.com &&
npm run build &&
rm -rf distLive &&
mkdir distLive &&
cp -r dist/* distLive
"
environment:
name: master
only:
- master
tags:
- gzb-runner
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment