mirror of
https://codeberg.org/Codeberg/Documentation.git
synced 2026-06-16 05:13:54 -07:00
deploy.sh
This commit is contained in:
parent
e0a72bf435
commit
9c17c4d3c3
2 changed files with 17 additions and 1 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1,2 +1,3 @@
|
|||
node_modules/
|
||||
_site/
|
||||
_site/
|
||||
pages.git/
|
||||
|
|
|
|||
15
deploy.sh
Executable file
15
deploy.sh
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash -ex
|
||||
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
rm -rf pages.git
|
||||
git clone git@codeberg.org:docs/pages.git pages.git
|
||||
rsync -av _site/* pages.git/
|
||||
( cd pages.git && git checkout --orphan current ) ## create new branch at origin
|
||||
( cd pages.git && git add -A ) ## add all generated files
|
||||
( cd pages.git && git commit -am "deployment" ) ## commit all
|
||||
( cd pages.git && git branch -D main ) ## delete old main branch incl. history
|
||||
( cd pages.git && git branch -m main ) ## rename current branch to main
|
||||
( cd pages.git && git push -f origin main ) ## force-push and rewrite (empty) history
|
||||
|
||||
Loading…
Reference in a new issue