rust-by-practice/en/deploy.sh

23 lines
496 B
Bash
Raw Normal View History

2022-02-28 07:32:54 -06:00
## this script deploys the static website of course.rs to github pages
2022-02-24 01:50:01 -06:00
2022-02-28 07:32:54 -06:00
## build static website for book
mdbook build
## copy CNAME info to book dir
cp ./assets/CNAME ./book/
2022-02-24 01:50:01 -06:00
2022-02-28 07:32:54 -06:00
## init git repo
cd book
git init
git config user.name "sunface"
git config user.email "cto@188.com"
git add .
git commit -m 'deploy'
git branch -M gh-pages
git remote add origin https://github.com/sunface/rust-by-practice
## push to github pages
git push -u -f origin gh-pages
## deploy zh-CN
2022-03-23 06:09:21 -06:00
cd ../../zh-CN
2022-02-28 07:32:54 -06:00
./deploy