Files
andromeda/.gitea/workflows/deploy.yaml
T
koningin_samira cf675a7834
Deploy to Unraid Share / copy-file (push) Successful in 12s
Cleaned up workflow and added some more checks
2026-04-19 22:40:11 +02:00

43 lines
1.1 KiB
YAML

name: Deploy to Unraid Share
on:
push:
branches:
- main
jobs:
copy-file:
runs-on: ubuntu-latest # Or your specific runner label
container:
volumes:
- /mnt/user/static:/static
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Copy File to Unraid Share
run: |
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
mkdir -p /static/andromeda/css/
# 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