Add more measures to prevent data loss I never learn huh.
Lonami Exo totufals@hotmail.com
Mon, 01 Mar 2021 19:35:50 +0100
1 files changed,
3 insertions(+),
1 deletions(-)
jump to
M
deploy.sh
→
deploy.sh
@@ -1,7 +1,9 @@
set -e +# Forgetting uncomitted files in the working directory has costed me the draft of another blog post :) +git status | grep "working tree clean" || (echo "ABORTING DEPLOY, WOULD LOSE FILES"; exit 1) zola build git checkout gh-pages -# Forgetting to exclude `.git` has costed me several days worth of work (and over 30 commits). +# Forgetting to exclude `.git` has costed me several days worth of work and over 30 commits :))) find . -maxdepth 1 -not -name '.' -not -name '.git' -not -name 'public' -exec rm -r {} \; mv public/* . echo "lonami.dev" > CNAME