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
|
- 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
|
||||||
Reference in New Issue
Block a user