# 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 -


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




![BUUCTF [GXYCTF2019]BabyUpload 1详解(.htaccess配置文件特性)](https://img-blog.csdnimg.cn/img_convert/b8f9c756a0bbff74a6e0622fa5212c2a.png)











![P8649 [蓝桥杯 2017 省 B] k 倍区间(前缀和+优化(桶分类))](https://img-blog.csdnimg.cn/direct/6c7e11ee7f9d4e41971267bf2b3c7d55.png)
![[React] 2023年最新面试题](https://img-blog.csdnimg.cn/direct/3c939bc17f3249e19ad185c98eecdae1.png)

