Documentation/deploy.sh
n ae684fbad4 Migrate to Codeberg Design Kit (#132) (#149)
TODO:
- [x] Hide navbar items on small screens
- [x] Fix `<blockquote>` rendering
- [x] Fix `<code>` rendering
- [ ] LibreJS Compatibility

Reviewed-on: https://codeberg.org/Codeberg/Documentation/pulls/149
Co-authored-by: n <n@noreply.codeberg.org>
Co-committed-by: n <n@noreply.codeberg.org>
2021-07-26 12:07:23 +02:00

13 lines
565 B
Bash
Executable file

#!/bin/bash -ex
npm run build
rm -rf pages.git
git clone $1 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 at $(date -u -Is)" ) ## 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