fix deploy
Some checks failed
Deploy back2 / deploy (push) Failing after 11s

This commit is contained in:
2026-04-03 01:24:19 +03:00
parent b36cf07635
commit 1db2931f46

View File

@@ -50,19 +50,35 @@ jobs:
git checkout main
git reset --hard origin/main
PHP_BIN="/opt/php84/bin/php"
if [ ! -x "$PHP_BIN" ]; then
PHP_BIN="$(command -v php || true)"
fi
if [ -z "$PHP_BIN" ] || [ ! -x "$PHP_BIN" ]; then
echo "PHP binary not found"
exit 1
fi
COMPOSER_BIN="$(command -v composer || true)"
if [ -z "$COMPOSER_BIN" ]; then
echo "Composer binary not found"
exit 1
fi
if [ -f composer.json ]; then
composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev
"$PHP_BIN" "$COMPOSER_BIN" install --no-interaction --prefer-dist --optimize-autoloader --no-dev
fi
if [ -f artisan ]; then
php artisan down --retry=60 || true
trap 'php artisan up || true' EXIT
"$PHP_BIN" artisan down --retry=60 || true
trap '"$PHP_BIN" artisan up || true' EXIT
php artisan optimize:clear
php artisan migrate --force
php artisan storage:link || true
php artisan config:cache
php artisan view:cache
php artisan queue:restart || true
"$PHP_BIN" artisan optimize:clear
"$PHP_BIN" artisan migrate --force
"$PHP_BIN" artisan storage:link || true
"$PHP_BIN" artisan config:cache
"$PHP_BIN" artisan view:cache
"$PHP_BIN" artisan queue:restart || true
fi
EOF