Fix Jeakyll preview cleanup step (#6)
Jekyll / jekyll (push) Successful in 20s Details

Part of #1

Reviewed-on: #6
Co-authored-by: Benoit Donneaux <benoit@leastauthority.com>
Co-committed-by: Benoit Donneaux <benoit@leastauthority.com>
This commit is contained in:
bEn 2024-05-24 12:30:52 +00:00 committed by btlogy
parent 5eb87a6bf5
commit 09be96a53c
1 changed files with 7 additions and 2 deletions

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_DOMAIN}