Fix Jeakyll preview cleanup step #6

Merged
btlogy merged 2 commits from 1.fix-cleanup into main 2024-05-24 12:30:53 +00:00
1 changed files with 6 additions and 1 deletions
Showing only changes of commit 52b555d925 - Show all commits

View File

@ -18,6 +18,12 @@ jobs:
actions: read actions: read
contents: read contents: read
steps: steps:
- name: Install requirements
id: install_requirements
run: |
apt-get -q update
apt-get -q install -y lftp
apt-get -q clean
- name: Cleanup Jeyll preview - name: Cleanup Jeyll preview
id: cleanup_preview id: cleanup_preview
run: | run: |
@ -25,6 +31,5 @@ jobs:
echo "${{ secrets.WWW_DEPLOY_KEY }}" > ~/.ssh/id_ed25519 echo "${{ secrets.WWW_DEPLOY_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519 chmod 600 ~/.ssh/id_ed25519
# Delete preview context from the remote site # Delete preview context from the remote site
sudo apt install -y lftp
echo -e "set sftp:connect-program ssh -a -x -o StrictHostKeyChecking=no; rm -r -f ${WEB_ROOT}${WEB_CONTEXT}\nbye" \ echo -e "set sftp:connect-program ssh -a -x -o StrictHostKeyChecking=no; rm -r -f ${WEB_ROOT}${WEB_CONTEXT}\nbye" \
| lftp sftp://${WEB_USER}:unused@${WEB_DOMAN} | lftp sftp://${WEB_USER}:unused@${WEB_DOMAN}