diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index c8b2830..42b7ae9 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -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")) + + 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 - ls -l - ls -l / - ls -l /static/ - - # Create the destination directory if it doesn't exist mkdir -p /static/andromeda/css/ - ls -l /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." \ No newline at end of file + # Copy files + for file in "${source_files[@]}"; do + cp $file /static/andromeda/css/ + + # 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 \ No newline at end of file