ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
### 配置文件 ```yml image: "node:13-alpine" after_script: - date stages: - build - build-and-deploy build: stage: build except: variables: - $CI_DEST - $CI_KEY script: - sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories - apk add python - npm i - npm run build tags: - k8s_public_centos7.2.1511 build-and-deploy: stage: build-and-deploy artifacts: paths: - $CI_PROJECT_NAME-$CI_COMMIT_SHORT_SHA.tar.gz only: refs: - master - develop variables: - $CI_DEST - $CI_KEY script: - sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories - apk add python - npm i - npm run build - tar zcf $CI_PROJECT_NAME-$CI_COMMIT_SHORT_SHA.tar.gz dist - apk add openssh - echo $CI_KEY > key - chmod 0600 key - sed -i 's/\\/\n/g' key - mv dist $CI_PROJECT_NAME - scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i key -r $CI_PROJECT_NAME $CI_DEST/ tags: - k8s_public_centos7.2.1511 ``` ### 服务器生成ssh公钥 1. user登录服务器 2. cd ~ 3. ssh-keygen -t rsa 一路回车 4. ssh 目前下有了`id_rsa`,`id_rsa.pub`两个文件 ``` cat id_rsa.pub >> ~/.ssh/authorized_keys chmod 0600 ~/.ssh/authorized_keys ``` ### gitlab变量配置 `CI_CANOE_NAME` `CI_DEST` `CI_KEY`