Cleaned up workflow and added some more checks
Deploy to Unraid Share / copy-file (push) Successful in 12s

This commit is contained in:
2026-04-19 22:40:11 +02:00
parent 1e10516afe
commit cf675a7834
+20 -12
View File
@@ -16,20 +16,28 @@ jobs:
- name: Copy File to Unraid Share - name: Copy File to Unraid Share
run: | run: |
# Check if share exists source_files=($(find ./ -type f -name "*.css"))
ls -la /static
ls -l echo "Getting ready to copy ${#source_files[@]} files..."
ls -l /
ls -l /static/ # Check if volume was mounted
if [ -d /static ]; then
echo "Share exists. NOTE: This will also succeed when the volume is not added as an allowed volume."
else
exit 1
fi
# Create the destination directory if it doesn't exist
mkdir -p /static/andromeda/css/ mkdir -p /static/andromeda/css/
ls -l /static/andromeda/css/ # Copy files
for file in "${source_files[@]}"; do
cp $file /static/andromeda/css/
# Copy your specific file # Check if file was actually copied
cp *.css /static/andromeda/css/ if [ -e $file ]; then
touch /static/andromeda/css/test.css echo "$file was copied successfully!"
else
echo "File successfully copied to Unraid share via bind mount." echo "There was an error copying $file"
exit 1
fi
done