refactor: simplify deployment logic and remove redundant commands in GitHub Actions workflow

This commit is contained in:
pbao9
2026-05-12 15:39:45 +07:00
parent cfffff96bf
commit d82c428f23
+5 -16
View File
@@ -27,31 +27,20 @@ jobs:
php -v
BRANCH="production"
REPO_URL="${{ secrets.REPO_URL }}"
cd httpdocs
pwd
ls -la
if [ ! -d ".git" ]; then
echo "First deploy..."
rm -rf ./*
git clone -b "$BRANCH" "$REPO_URL" .
else
if test -d .git; then
echo "Updating source..."
git fetch origin
git reset --hard origin/$BRANCH
fi
else
echo "First deploy..."
composer install \
--no-dev \
--optimize-autoloader \
--no-interaction
git clone -b "$BRANCH" "${{ secrets.REPO_URL }}" .
fi
php artisan migrate --force