plume部署到github
约 549 字大约 2 分钟
2025-06-26
新建 deploy.sh 文件
前提:已经配置好 github 仓库
在项目根目录下新建 deploy.sh 文件
Vue App
jingzhe-blog-plume
deploy.sh
package.json
README.md
jingzhe-blog-plume/deploy.sh
#!/usr/bin/env sh
# 确保脚本抛出遇到的错误
set -e
# 生成静态文件
npm run docs:build
# 进入生成的文件夹
cd docs/.vuepress/dist
git init
git add -A
git commit -m 'deploy'
# 如果发布到 https://<USERNAME>.github.io/<REPO>
git push -f git@github.com:Edana22/Edana22.github.io.git master
cd -
jingzhe-blog-plume/package.json
...
jingzhe-blog-plume/README.md
README
注意
记得修改 git push -f 仓库地址
中的仓库地址!
部署到 github
使用 git bash
打开 deploy.sh
所在的文件夹,右键,选择 open git bash here
输入 sh deploy.sh
, 按回车
Administrator@PC-202003301224 MINGW64 /e/SunshineEbook/jingzhe-blog-plume (master)
$ sh deploy.sh
> my-vuepress-site@1.0.0 docs:build
> vuepress build docs --clean-cache --clean-temp
- Cleaning temp
√ Cleaning temp - done in 31ms
- Cleaning cache
√ Cleaning cache - done in 16ms
- Initializing and preparing data
√ Initializing and preparing data - done in 2.87s
- Compiling with vite
√ Compiling with vite - done in 22.59s
- Rendering 37 pages
√ Rendering 37 pages - done in 1.08s
success VuePress build completed in 28.12s!
Initialized empty Git repository in E:/SunshineEbook/jingzhe-blog-plume/docs/.vuepress/dist/.git/
warning: in the working copy of 'article/56kdz38m/index.html', LF will be replaced by CRLF the next time Git touches it
[master (root-commit) fdf9a0c] deploy
260 files changed, 6750 insertions(+)
create mode 100644 404.html
create mode 100644 article/56kdz38m/index.html
create mode 100644 assets/KaTeX_Main-Bold-Cx986IdX.woff2
create mode 100644 assets/KaTeX_Main-Bold-Jm3AIy58.woff
create mode 100644 assets/KaTeX_Main-Bold-waoOVXN0.ttf
create mode 100644 assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2
create mode 100644 assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf
create mode 100644 assets/KaTeX_Main-BoldItalic-SpSLRI95.woff
create mode 100644 vue/0hdjehes/index.html
create mode 100644 vue/vue_basic/5wiqpaxq/index.html
create mode 100644 vue/vue_basic/8f0v3d8e/index.html
create mode 100644 vue/vue_basic/jyuc65wh/index.html
create mode 100644 vue_debug/674nlxw3/index.html
Enumerating objects: 311, done.
Counting objects: 100% (311/311), done.
Delta compression using up to 6 threads
Compressing objects: 100% (270/270), done.
Writing objects: 100% (311/311), 6.25 MiB | 1.94 MiB/s, done.
Total 311 (delta 42), reused 0 (delta 0), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (42/42), done.
To github.com:Edana22/Edana22.github.io.git
+ 4f203ca...fdf9a0c master -> master (forced update)
/e/SunshineEbook/jingzhe-blog-plume
Administrator@PC-202003301224 MINGW64 /e/SunshineEbook/jingzhe-blog-plume (master)
$
使用 npm run deploy 自动化部署
在package.json
中添加scripts
命令
在 vscode 终端中新建 bash 终端,输入 npm run deploy
🎉 部署成功!