26 lines
490 B
Bash
26 lines
490 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
# Change to the directory containing the files (assuming it's named 'dist')
|
||
|
cd dist
|
||
|
|
||
|
# Initialize FTP connection
|
||
|
ftp -n << EOF
|
||
|
open $FTP_SERVER
|
||
|
user $FTP_USER $FTP_PASSWORD
|
||
|
|
||
|
# Upload HTML files
|
||
|
for file in *.html; do
|
||
|
put "$file"
|
||
|
done
|
||
|
|
||
|
# Upload geofeed.csv (assuming it's in the parent directory)
|
||
|
cd ..
|
||
|
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"
|