update deploy script
continuous-integration/drone/push Build is failing Details

This commit is contained in:
ktyl 2022-09-26 21:50:52 +01:00
parent 953a40c88f
commit 81c75a48bc
2 changed files with 6 additions and 18 deletions

View File

@ -27,4 +27,4 @@ steps:
# skip key checking
- echo "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
- cat ~/.ssh/config
- ssh gemini@period3.xyz "git clone $REPO"
- ssh gemini@period3.xyz "chmod +x deploy.sh && bash deploy.sh $REPO"

View File

@ -1,20 +1,8 @@
#!/usr/bin/env bash
site=period3.xyz
gemini=/home/gemini/gemini
dest="$gemini/content"
# remove existing files
sudo rm -rv $dest
# copy received files to hosting location
sudo mv $site $dest
sudo chown -R gemini:gemini $dest
# delete self
rm -v deploy.sh
printf "\ndone!\n"
repo="$1"
deploypath="$HOME/gemini/content"
sourcepath="content"
[[ -d $deploypath ]] && rm -r $deploypath
cp -r $sourcepath $deploypath