diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac49a39..c5ad381 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,9 +24,11 @@ jobs: # 工作流 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 - env: # 设置变量 + 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 - # 部署前要执行的命令,记得进入某个目录后要后面要退回开始的目录 \ No newline at end of file + BUILD_SCRIPT: npm install && npm run build && npm run deployToCoding && cd docs/.vuepress/dist && echo 'b.evanblogweb.com' > CNAME && cd - # 部署前要执行的命令,记得进入某个目录后要后面要退回开始的目录 + # npm run deployToCoding 此命令是部署到腾讯云开发者平台(coding) \ No newline at end of file diff --git a/deploy.sh b/deploy.sh index 3746fd5..69d0ab0 100644 --- a/deploy.sh +++ b/deploy.sh @@ -16,12 +16,6 @@ git init git add -A git commit -m 'deploy' -# 如果发布到 https://.github.io -# git push -f git@github.com:/.github.io.git master - -# 如果发布到 https://.github.io/ -# git push -f git@github.com:/.git master:gh-pages - # 发布到github git push -f git@github.com:xugaoyi/evanblog.git master:gh-pages diff --git a/deployToCoding.sh b/deployToCoding.sh index c417878..99d7a49 100644 --- a/deployToCoding.sh +++ b/deployToCoding.sh @@ -6,6 +6,7 @@ cd docs/.vuepress/dist echo 'evanblogweb.com\nwww.evanblogweb.com' > CNAME git init git add -A -git commit -m 'deploy' -git push -f git@git.dev.tencent.com:xugaoyi/xugaoyi.git master +git commit -m '来着GitHub Action的部署deploy' +#git push -f git@git.dev.tencent.com:xugaoyi/xugaoyi.git master +git push -f https://xugaoyi:${CODING_TOKEN}@git.dev.tencent.com/xugaoyi/xugaoyi.git master cd - \ No newline at end of file diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index eb93da3..ca2e58c 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -2,12 +2,12 @@ const nav = require('./config/nav.js'); const sidebar = require('./config/sidebar.js'); module.exports = { title: 'Evan Blog', // 标题 - description: 'Evan Blog个人技术博客,基于vuepress构建,专注前端学习与总结。JavaScript,ES6,TypeScript,vue,python,css3,html5,Node,git,github等技术文章。', // 描述,以 标签渲染到当前页面的 HTML 中 + description: 'Evan Blog个人技术博客,基于vuepress构建,专注web前端学习与总结。JavaScript,js,ES6,TypeScript,vue,python,css3,html5,Node,git,github等技术文章。', // 描述,以 标签渲染到当前页面的 HTML 中 // process.env.VUEPRESS_BASE 在package.json生成 // base: process.env.VUEPRESS_BASE || '/', // 基础路径,默认'/',如果放到github pages要改成仓库名 head: [ // 注入到当前页面 中的标签,格式[tagName, { attrName: attrValue }, innerHTML?] ['link', { rel: 'icon', href: '/img/logo2.png' }], //favicons,资源放在public文件夹 - ['meta', { name: 'keywords', content: 'Evan Blog,个人博客,技术博客,vuepress,技术文档,web前端,前端学习,技术总结与分享,JavaScript,ES6,TypeScript,vue,python,css3,html5,Node,git,github,markdown,面试问答集锦'}], + ['meta', { name: 'keywords', content: 'Evan Blog,个人博客,技术博客,vuepress,技术文档,web前端,前端学习,技术总结与分享,JavaScript,js,ES6,TypeScript,vue,python,css3,html5,Node,git,github,markdown,面试问答集锦'}], ['meta', { name: 'baidu-site-verification', content: 'YwUALncFiI'}], // ['script', { src: 'https://hm.baidu.com/hm.js?837775213e724293b4af2b9526e238b4'}] ],