mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-08 12:56:48 +00:00
Fix overwriting of original files and add version awareness
This commit is contained in:
parent
e77026c30e
commit
ce0968fbab
3
.github/workflows/update-website.yml
vendored
3
.github/workflows/update-website.yml
vendored
@ -6,6 +6,7 @@ on:
|
|||||||
- main
|
- main
|
||||||
paths:
|
paths:
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
|
- '.github/workflows/update-website.yml'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_and_deploy:
|
build_and_deploy:
|
||||||
@ -36,6 +37,8 @@ jobs:
|
|||||||
GIT_SSH_COMMAND="ssh -i ./book_publish_key -o UserKnownHostsFile=./known_hosts" git clone git@github.com:asterinas/book.git temp_book
|
GIT_SSH_COMMAND="ssh -i ./book_publish_key -o UserKnownHostsFile=./known_hosts" git clone git@github.com:asterinas/book.git temp_book
|
||||||
cd temp_book
|
cd temp_book
|
||||||
git checkout --orphan newBranch
|
git checkout --orphan newBranch
|
||||||
|
git rm -rf *
|
||||||
|
cp -r ../asterinas/docs/book/* ./
|
||||||
git add -A
|
git add -A
|
||||||
git commit -am "Update website"
|
git commit -am "Update website"
|
||||||
git branch -D main
|
git branch -D main
|
||||||
|
Loading…
x
Reference in New Issue
Block a user