mirror of
https://github.com/sunface/rust-by-practice.git
synced 2025-06-23 04:29:41 +00:00
add deploy script
This commit is contained in:
1
assets/CNAME
Normal file
1
assets/CNAME
Normal file
@ -0,0 +1 @@
|
||||
exercise.rs
|
21
deploy
Executable file
21
deploy
Executable file
@ -0,0 +1,21 @@
|
||||
## this script deploys the static website of course.rs to github pages
|
||||
|
||||
## build static website for book
|
||||
mdbook build
|
||||
## copy CNAME info to book dir
|
||||
cp ./assets/CNAME ./book/
|
||||
cp ./assets/*.html ./book/
|
||||
cp ./assets/sitemap.xml ./book/
|
||||
|
||||
## 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/course-rs/rust-exercise
|
||||
|
||||
## push to github pages
|
||||
git push -u -f origin gh-pages
|
Reference in New Issue
Block a user