use lftp for sftp access and recursive deletion
This commit is contained in:
parent
99dd009236
commit
3e67e3a310
1 changed files with 15 additions and 13 deletions
|
@ -78,17 +78,19 @@ jobs:
|
||||||
# \-\-disable-external \
|
# \-\-disable-external \
|
||||||
# \-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/"
|
# \-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/"
|
||||||
|
|
||||||
- name: Checkout & Deploy
|
- name: Deploy
|
||||||
run: |
|
run: |
|
||||||
mkdir deploy && cd deploy
|
mkdir deploy
|
||||||
git clone https://git.asandikci.com/asandikci.com/web
|
cp -rfv ../web/_site .
|
||||||
cd web
|
ls -la
|
||||||
git checkout website
|
|
||||||
cd _site
|
lftp --user ${{ secrets.SFTP_USERNAME }} --password ${{ secrets.SFTP_PASSWORD }} sftp://${{ vars.SFTP_HOST }} -e "rm -r www/; mirror -R . www/"
|
||||||
echo '${{ secrets.SFTP_PASSWORD }}' > ~/.passwd
|
|
||||||
chmod 0400 ~/.passwd
|
|
||||||
sshpass -f ~/.passwd sftp -oBatchMode=no -o StrictHostKeyChecking=accept-new -b - ${{ secrets.SFTP_USERNAME }}@${{ vars.SFTP_HOST }} << !
|
# echo '${{ secrets.SFTP_PASSWORD }}' > ~/.passwd
|
||||||
rm www/*
|
# chmod 0400 ~/.passwd
|
||||||
put -r . www/
|
# sshpass -f ~/.passwd sftp -oBatchMode=no -o StrictHostKeyChecking=accept-new -b - ${{ secrets.SFTP_USERNAME }}@${{ vars.SFTP_HOST }} << !
|
||||||
bye
|
# rm www/*
|
||||||
!
|
# put -r . www/
|
||||||
|
# bye
|
||||||
|
# !
|
Loading…
Reference in a new issue