Commit f9b3f8029b1a38df4889bf4d66c43cb28961ca45

Authored by ly525
1 parent e7228d78

docs: deploy docs to github pages

docs/.vuepress/config.js
@@ -67,7 +67,10 @@ module.exports = { @@ -67,7 +67,10 @@ module.exports = {
67 }, 67 },
68 title, 68 title,
69 description, 69 description,
70 - base: '/', // why '/documentation' not work for surge.sh 70 + // why '/documentation' not work for surge.sh
  71 + // base: '/' for surge.sh
  72 + // base '/luban-h5/' for github pages
  73 + base: '/luban-h5/',
71 // ga: '', 74 // ga: '',
72 themeConfig: { 75 themeConfig: {
73 nav: [ 76 nav: [
docs/deploy.sh 0 → 100755
  1 +# 生成静态文件
  2 +npm run docs:build
  3 +
  4 +# 进入生成的文件夹
  5 +cd .vuepress/dist
  6 +
  7 +# 如果是发布到自定义域名
  8 +# echo 'www.example.com' > CNAME
  9 +
  10 +git init
  11 +git add -A
  12 +git commit -m 'deploy'
  13 +
  14 +# 如果发布到 https://<USERNAME>.github.io
  15 +# git push -f git@github.com:<USERNAME>/<USERNAME>.github.io.git master
  16 +
  17 +# 如果发布到 https://<USERNAME>.github.io/<REPO>
  18 +git push -f git@github.com:ly525/luban-h5.git master:gh-pages
  19 +
  20 +cd -
0 \ No newline at end of file 21 \ No newline at end of file