test deploy
This commit is contained in:
parent
06e9264377
commit
e7fe3df306
|
|
@ -22,13 +22,19 @@ jobs: # 工作流
|
|||
uses: actions/setup-node@v1 # 作用:安装nodejs
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }} # 版本
|
||||
- name: Build and Deploy # 步骤3
|
||||
uses: JamesIves/github-pages-deploy-action@master # 作用:将项目构建和部署到github。 https://github.com/JamesIves/github-pages-deploy-action
|
||||
- name: run deploy.sh
|
||||
env: # 设置环境变量
|
||||
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} # toKen私密变量
|
||||
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} # toKen私密变量
|
||||
CODING_TOKEN: ${{ secrets.CODING_TOKEN }} # 腾讯云开发者平台(coding)私密token
|
||||
BASE_BRANCH: master # 要部署的文件夹所在的分支.
|
||||
BRANCH: gh-pages # 部署到的分支
|
||||
FOLDER: docs/.vuepress/dist # 要部署的文件夹.
|
||||
BUILD_SCRIPT: npm install && npm run build && npm run deployToCoding && cd docs/.vuepress/dist && echo 'b.evanblogweb.com' > CNAME && cd - # 部署前要执行的命令,记得进入某个目录后要后面要退回开始的目录
|
||||
# npm run deployToCoding 此命令是部署到腾讯云开发者平台(coding)
|
||||
run: npm intall && npm run deploy
|
||||
|
||||
# - name: Build and Deploy # 步骤3
|
||||
# uses: JamesIves/github-pages-deploy-action@master # 作用:将项目构建和部署到github。 https://github.com/JamesIves/github-pages-deploy-action
|
||||
# env: # 设置环境变量
|
||||
# ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} # toKen私密变量
|
||||
# CODING_TOKEN: ${{ secrets.CODING_TOKEN }} # 腾讯云开发者平台(coding)私密token
|
||||
# BASE_BRANCH: master # 要部署的文件夹所在的分支.
|
||||
# BRANCH: gh-pages # 部署到的分支
|
||||
# FOLDER: docs/.vuepress/dist # 要部署的文件夹.
|
||||
# BUILD_SCRIPT: npm install && npm run build && npm run deployToCoding && cd docs/.vuepress/dist && echo 'b.evanblogweb.com' > CNAME && cd - # 部署前要执行的命令,记得进入某个目录后要后面要退回开始的目录
|
||||
# # npm run deployToCoding 此命令是部署到腾讯云开发者平台(coding)
|
||||
24
deploy.sh
24
deploy.sh
|
|
@ -9,21 +9,31 @@ npm run build
|
|||
# 进入生成的文件夹
|
||||
cd docs/.vuepress/dist
|
||||
|
||||
# 如果是发布到自定义域名
|
||||
# 自定义域名
|
||||
echo 'b.evanblogweb.com' > CNAME
|
||||
|
||||
git init
|
||||
git add -A
|
||||
git commit -m 'deploy'
|
||||
|
||||
# 发布到github
|
||||
git push -f git@github.com:xugaoyi/evanblog.git master:gh-pages
|
||||
if [ !$GITHUB_TOKEN ]; then
|
||||
msg='deploy'
|
||||
githubUrl=git@github.com:xugaoyi/evanblog.git
|
||||
else
|
||||
msg='GitHub Action deploy'
|
||||
githubUrl=https://xugaoyi:$GITHUB_TOKEN@github.com/xugaoyi/evanblog.git
|
||||
fi
|
||||
git commit -m $msg
|
||||
git push -f $githubUrl master:gh-pages # 发布到github
|
||||
|
||||
# coding
|
||||
echo 'evanblogweb.com\nwww.evanblogweb.com' > CNAME
|
||||
git add -A
|
||||
git commit -m 'deploy'
|
||||
git push -f git@git.dev.tencent.com:xugaoyi/xugaoyi.git master # 发布到coding.net
|
||||
if [ !$CODING_TOKEN ]; then
|
||||
codingUrl=git@git.dev.tencent.com:xugaoyi/xugaoyi.git
|
||||
else
|
||||
codingUrl=https://xugaoyi:${CODING_TOKEN}@git.dev.tencent.com/xugaoyi/xugaoyi.git
|
||||
fi
|
||||
git commit -m $msg
|
||||
git push -f $codingUrl master # 发布到coding
|
||||
|
||||
|
||||
cd - # 退回开始所在目录
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
| emoji表情备忘单 | <https://www.webfx.com/tools/emoji-cheat-sheet> | |
|
||||
| processon在线作图 | <https://www.ecma-international.org> | 流程图、思维导图、原型图等 |
|
||||
| 百度脑图 | <https://naotu.baidu.com> | 思维导图 |
|
||||
| Linux命令手册 | <https://ipcmen.com/> | 包含shell命令教程 |
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue