Fetch the repository succeeded.
This action will force synchronization from 蚂蚁/Senior-FrontEnd, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
language: node_js
node_js:
- 12 #设置语言版本,
branches:
only:
- main #设置只监听哪个分支
cache:
apt: true
yarn: true
directories:
- node_modules #缓存依赖
before_install:
- openssl aes-256-cbc -K $encrypted_844372f51c48_key -iv $encrypted_844372f51c48_iv
-in id_rsa.enc -out ~/.ssh/id_rsa -d # id_rsa.enc加密的私钥
- chmod 600 ~/.ssh/id_rsa # 降低 id_rsa 文件的权限
- echo -e "Host 122.51.11.29\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config # 将生产服务器地址加入到测试机的信任列表中
install: # 安装依赖
- npm i
script: # 需要执行的脚本
- npm run build
- sed -i 's/\r//' deploy.sh
- bash ./deploy.sh
addons:
ssh_known_hosts: 122.51.11.29 # 添加 SSH 信任列表
after_success: # script 阶段成功时执行
# - scp -o stricthostkeychecking=no -r ./dist/* root@122.51.11.29:/home/www/blog # 使用scp拷贝到服务
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。