guide/deployment/ #129
Replies: 5 comments 13 replies
-
部署的时候间歇性的遇到这个错误 |
Beta Was this translation helpful? Give feedback.
-
在部署到Github Page的时候,我这里有一个自动部署脚本可供参考👇
用法:
然后,打开Git Bash,cd到你的项目目录下,然后执行命令:
等待一会,项目就会自动上传到
|
Beta Was this translation helpful? Give feedback.
-
关于GitHub Pages的部署有什么教程吗,网上内容版本不一样,难以判断是否有用,本人主要是卡在GitHub Actions了 |
Beta Was this translation helpful? Give feedback.
-
我想问下,我使用nginx,然后网页的样式都消失了,是需要什么配置吗 |
Beta Was this translation helpful? Give feedback.
-
项目自带的那个,构建报了看不懂,还不好搜的错,懒得折腾了。 我直接分享一个我自己常用的一个 万能+灵活 配置版本吧: 可以本地运行,可以在 github 上运行,都可以自动部署到 github 的 gh-pages 分支。 Step 1 本地创建构建文件并测试一下本地创建一个 该脚本运行完能将结果能推送到 gh-pages 分支,并且不影响本地项目。 文件里的邮箱要和 github 上的邮箱和用户名一致,不然会报错。因为要和对应的 ssh keys 能验证匹配 注意:本地项目下运行可以删掉 #!/usr/bin/env sh
# 确保脚本抛出遇到的错误
set -e
## 安装依赖
npm install
# 运行构建命令,生成静态文件
npm run docs:build
# 进入生成的文件夹
cd docs/.vuepress/dist
# 推送构建结果到gh-pages分支
git init
# 邮箱
git config user.email "[email protected]"
# 用户名
git config --global user.name "xxxx"
# 添加文件并提交
git add -A
git commit -m 'Automatic build'
# 不确定 git init 后,当前分支是master 还是 main
# 这里再次强制创建切换到 master 分支。
# 可以指定其他的分支名,能和 push 命令里的分支名对应即可。
git checkout -B master
# 强制推送到gh-pages分支。
git push -f git仓库地址 master:gh-pages
cd - Step 2 测试一下测试主要分两部分:
在本地使用 Step 3 创建一个变量存储
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
guide/deployment/
提示 此文档 fork 自 vuepress official doc, 仅为了方便阅读。 下述的指南基于以下条件: Markdown 源文件放置在你项目的 docs 目录; 使用的是默认的构建输出目录 (.vuepress/dist) ; 使用 pnpm 作为包管理器,当然也支持使用 npm 或 yarn 。 VuePress 作为项目依赖安装,并在...
https://plume.pengzhanbo.cn/guide/deployment/
Beta Was this translation helpful? Give feedback.
All reactions