From e7abc6239a15d74b41238014bf0f33ed2d20d23f Mon Sep 17 00:00:00 2001 From: Minecon724 Date: Fri, 11 Oct 2024 11:36:16 +0200 Subject: [PATCH] fix workflow once and for all --- .forgejo/workflows/deploy.yml | 2 +- deploy.sh | 16 ++-------------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml index 89080e8..ce84a4a 100644 --- a/.forgejo/workflows/deploy.yml +++ b/.forgejo/workflows/deploy.yml @@ -7,7 +7,7 @@ jobs: - run: git clone https://git.m724.eu/Minecon724/dn42-info . - run: npm i - run: npx parcel build src/index.html - - run: apt update && apt install ftp -y + - run: apt update && apt install ncftp -y - run: chmod +x deploy.sh && ./deploy.sh env: FTP_SERVER: ${{ secrets.FTP_SERVER }} diff --git a/deploy.sh b/deploy.sh index d72abba..31ad555 100644 --- a/deploy.sh +++ b/deploy.sh @@ -1,19 +1,7 @@ #!/bin/bash -# Change to the directory containing the files (assuming it's named 'dist') -cd dist +cp geofeed.csv dist -# Initialize FTP connection -ftp -n << EOF -open $FTP_SERVER -user $FTP_USER $FTP_PASSWORD +ncftpput -R -u $FTP_USER -p $FTP_PASSWORD $FTP_SERVER / dist -put -r . -put ../geofeed.csv - -# Close FTP connection -bye -EOF - -# Refresh cache curl -H "AccessKey: $ACCESS_KEY" "https://api.bunny.net/purge?url=https%3A%2F%2Fdn42.m724.eu&async=false"