0 Star 1 Fork 0

uhfun / Uhfun-Jekyll

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
codeship_deploy.sh 1.69 KB
一键复制 编辑 原始数据 按行查看 历史
fuhangbo 提交于 2020-06-05 15:28 . ...
# Environment Variables
# key value
# GH_PAGES_BRANCH gh-pages
# CUSTOM_DOAMIN uhfun.cn
# GH_USER_EMAIL 2512500628@qq.com
# GH_USER_NAME uhfun
# GH_PAGES_REPOSITORY Uhfun-Jekyll
# master
echo '添加posts分支内文章' && cd .. && git clone -b _posts git@github.com:${CI_REPO_NAME}.git _posts && ls _posts && mv _posts/*.md clone/_posts
echo '下载github pages 静态资源' && cd clone && git clone -b ${GH_PAGES_BRANCH} git@github.com:${CI_REPO_NAME}.git _site
echo '删除除.git 外所有文件' && rm -rf _site/**/* || exit 0
echo '重新编译生成静态文件' && bundle install && bundle exec jekyll build
cd _site && echo '自定义域名' && echo ${CUSTOM_DOAMIN} > CNAME
git config --global user.email ${GH_USER_EMAIL}
git config --global user.name ${GH_USER_NAME}
git add .
git commit -m "Commit ${CI_COMMIT_ID} ${CI_COMMIT_MESSAGE} to branch ${GH_PAGES_BRANCH}" && git push origin ${GH_PAGES_BRANCH}
#_posts
cd .. && echo '下载github pages 源文件' && git clone -b master git@github.com:${CI_REPO_NAME}.git _source && cd _source
echo '添加posts分支内文章' && mv ../clone/* _posts
echo '下载github pages 静态资源' && git clone -b ${GH_PAGES_BRANCH} git@github.com:${CI_REPO_NAME}.git _site
echo '删除除.git 外所有文件' && rm -rf _site/**/* || exit 0
echo '重新编译生成静态文件' && bundle install && bundle exec jekyll build
cd _site && echo '自定义域名' && echo ${CUSTOM_DOAMIN} > CNAME
git config --global user.email ${GH_USER_EMAIL}
git config --global user.name ${GH_USER_NAME}
git add .
git commit -m "Commit ${CI_COMMIT_ID} ${CI_COMMIT_MESSAGE} to branch ${GH_PAGES_BRANCH}" && git push origin ${GH_PAGES_BRANCH}
HTML
1
https://gitee.com/uhfun/Uhfun-Jekyll.git
git@gitee.com:uhfun/Uhfun-Jekyll.git
uhfun
Uhfun-Jekyll
Uhfun-Jekyll
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891