Cleaned up workflow and added some more checks
Deploy to Unraid Share / copy-file (push) Successful in 12s
Deploy to Unraid Share / copy-file (push) Successful in 12s
This commit is contained in:
@@ -16,20 +16,28 @@ jobs:
|
||||
|
||||
- name: Copy File to Unraid Share
|
||||
run: |
|
||||
# Check if share exists
|
||||
ls -la /static
|
||||
source_files=($(find ./ -type f -name "*.css"))
|
||||
|
||||
ls -l
|
||||
ls -l /
|
||||
ls -l /static/
|
||||
echo "Getting ready to copy ${#source_files[@]} files..."
|
||||
|
||||
# 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/
|
||||
|
||||
ls -l /static/andromeda/css/
|
||||
# Copy files
|
||||
for file in "${source_files[@]}"; do
|
||||
cp $file /static/andromeda/css/
|
||||
|
||||
# Copy your specific file
|
||||
cp *.css /static/andromeda/css/
|
||||
touch /static/andromeda/css/test.css
|
||||
|
||||
echo "File successfully copied to Unraid share via bind mount."
|
||||
# Check if file was actually copied
|
||||
if [ -e $file ]; then
|
||||
echo "$file was copied successfully!"
|
||||
else
|
||||
echo "There was an error copying $file"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user