2023-05-14 16:18:25 +03:00
|
|
|
#!/bin/bash
|
2023-05-14 22:07:16 +03:00
|
|
|
|
2024-01-21 22:30:23 +02:00
|
|
|
# build web files
|
2023-05-14 22:07:16 +03:00
|
|
|
cd web
|
|
|
|
|
npm run build
|
|
|
|
|
cd ..
|
|
|
|
|
|
2025-02-18 20:43:01 +02:00
|
|
|
# Check and set secrets (needed only when secrets change
|
|
|
|
|
#if [ -s .env-fly ]; then
|
|
|
|
|
# while read line; do
|
|
|
|
|
# echo "Setting secrets: $line"
|
|
|
|
|
# fly secrets set "$line"
|
|
|
|
|
# done < .env-fly
|
|
|
|
|
#else
|
|
|
|
|
# echo ".env-fly file is missing or empty, skipping setting secrets"
|
|
|
|
|
# exit 1
|
|
|
|
|
#fi
|
2024-01-21 22:30:23 +02:00
|
|
|
|
|
|
|
|
# Test, build and deply
|
2023-05-23 22:02:56 +03:00
|
|
|
if sbt test; then
|
|
|
|
|
sbt assembly && fly deploy
|
|
|
|
|
else
|
|
|
|
|
echo "Tests failed, skipping deploy!"
|
2024-01-21 22:30:23 +02:00
|
|
|
exit 1
|
2023-05-23 22:02:56 +03:00
|
|
|
fi
|