vuepress-----7、发布在GitHub

# 7、发布在GitHub

在你的项目中,创建一个如下的 deploy.sh 文件(请自行判断去掉高亮行的注释):

#!/usr/bin/env sh

# 确保脚本抛出遇到的错误
set -e

# 生成静态文件
npm run docs:build

# 进入生成的文件夹
cd docs/.vuepress/dist

# 如果是发布到自定义域名
# echo 'www.example.com' > CNAME

git init
git add -A
git commit -m 'deploy'

# 如果发布到 https://<USERNAME>.github.io
# git push -f git@github.com:<USERNAME>/<USERNAME>.github.io.git master

# 如果发布到 https://<USERNAME>.github.io/<REPO>
# git push -f git@github.com:<USERNAME>/<REPO>.git master:gh-pages

cd -

image-20231123134557582

image-20231123134612933

[外链图片转存中…(img-NGIE6FOa-1701236870198)]

相关推荐

  1. Github逛街

    2023-12-07 04:58:03       34 阅读
  2. GitHub上搜索】

    2023-12-07 04:58:03       39 阅读

最近更新

  1. TCP协议是安全的吗?

    2023-12-07 04:58:03       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2023-12-07 04:58:03       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2023-12-07 04:58:03       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2023-12-07 04:58:03       18 阅读

热门阅读

  1. SpringMVC常用注解

    2023-12-07 04:58:03       25 阅读
  2. Spring Boot学习(三十三):集成kafka

    2023-12-07 04:58:03       47 阅读
  3. RK3288升级WebView版本,替换webview app

    2023-12-07 04:58:03       35 阅读
  4. android 13.0 Camera2去掉前置摄像头闪光灯功能

    2023-12-07 04:58:03       36 阅读
  5. ThreadLocal+TaskDecorator实现父子线程 参数传递

    2023-12-07 04:58:03       37 阅读
  6. 【无标题】

    2023-12-07 04:58:03       47 阅读
  7. a href自定义下载文件名

    2023-12-07 04:58:03       42 阅读
  8. 设计模式&委派模式(Delegate Pattern)

    2023-12-07 04:58:03       33 阅读
  9. 【LeetCode】258. 各位相加

    2023-12-07 04:58:03       36 阅读
  10. Vue中的组件通信:从子到父的数据传递

    2023-12-07 04:58:03       40 阅读
  11. C++设计模式——建造者模式(Builder)

    2023-12-07 04:58:03       44 阅读
  12. ES6拓展API

    2023-12-07 04:58:03       32 阅读