Updating CI.
Some checks failed
Deploy Greenlight API / deploy (push) Failing after 40s

This commit is contained in:
Maxime Delporte
2025-10-31 10:17:20 +01:00
parent 0229af2932
commit 4f31716a22

View File

@@ -32,17 +32,19 @@ jobs:
- name: Applying database migrations
run: |
echo "Creating migrations folder 📂"
ssh -p ${{ secrets.SERVER_PORT }} ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }} "mkdir -p /var/www/greenlight/migrations"
echo "Copy migrations files 📑"
scp -r ./migrations ${{ secrets.SERVER_PORT }} ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }}:/var/www/greenlight/migrations
ssh -p ${{ secrets.SERVER_PORT }} ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }} '
set -e
cd /var/www/greenlight
echo "Running migrations..."
echo "Running migrations ⚙️"
migrate -path=./migrations -database "$GREENLIGHT_DB_DSN" up
echo "Cleaning..."
echo "Cleaning 🧹"
cd .. && rm -rf greenlight
'
"