update deploy script
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
953a40c88f
commit
81c75a48bc
|
@ -27,4 +27,4 @@ steps:
|
||||||
# skip key checking
|
# skip key checking
|
||||||
- echo "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
|
- echo "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
|
||||||
- cat ~/.ssh/config
|
- cat ~/.ssh/config
|
||||||
- ssh gemini@period3.xyz "git clone $REPO"
|
- ssh gemini@period3.xyz "chmod +x deploy.sh && bash deploy.sh $REPO"
|
||||||
|
|
22
deploy.sh
22
deploy.sh
|
@ -1,20 +1,8 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
site=period3.xyz
|
repo="$1"
|
||||||
gemini=/home/gemini/gemini
|
deploypath="$HOME/gemini/content"
|
||||||
dest="$gemini/content"
|
sourcepath="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"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[[ -d $deploypath ]] && rm -r $deploypath
|
||||||
|
cp -r $sourcepath $deploypath
|
||||||
|
|
Loading…
Reference in New Issue