fix workflow once and for all
All checks were successful
/ deploy (push) Successful in 31s

This commit is contained in:
Minecon724 2024-10-11 11:36:16 +02:00
parent 37af76a29b
commit e7abc6239a
Signed by: Minecon724
GPG key ID: 3CCC4D267742C8E8
2 changed files with 3 additions and 15 deletions

View file

@ -7,7 +7,7 @@ jobs:
- run: git clone https://git.m724.eu/Minecon724/dn42-info . - run: git clone https://git.m724.eu/Minecon724/dn42-info .
- run: npm i - run: npm i
- run: npx parcel build src/index.html - 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 - run: chmod +x deploy.sh && ./deploy.sh
env: env:
FTP_SERVER: ${{ secrets.FTP_SERVER }} FTP_SERVER: ${{ secrets.FTP_SERVER }}

View file

@ -1,19 +1,7 @@
#!/bin/bash #!/bin/bash
# Change to the directory containing the files (assuming it's named 'dist') cp geofeed.csv dist
cd dist
# Initialize FTP connection ncftpput -R -u $FTP_USER -p $FTP_PASSWORD $FTP_SERVER / dist
ftp -n << EOF
open $FTP_SERVER
user $FTP_USER $FTP_PASSWORD
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" curl -H "AccessKey: $ACCESS_KEY" "https://api.bunny.net/purge?url=https%3A%2F%2Fdn42.m724.eu&async=false"