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

This commit is contained in:
Maxime Delporte
2025-10-31 10:14:05 +01:00
parent e639e44d72
commit 0229af2932

View File

@@ -32,8 +32,19 @@ jobs:
- name: Applying database migrations - name: Applying database migrations
run: | run: |
ssh -p ${{ secrets.SERVER_PORT }} ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }} "\ ssh -p ${{ secrets.SERVER_PORT }} ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }} "mkdir -p /var/www/greenlight/migrations"
migrate -path=./migrations -database=${{ secrets.GREENLIGHT_DB_DSN }} up \ 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..."
migrate -path=./migrations -database "$GREENLIGHT_DB_DSN" up
echo "Cleaning..."
cd .. && rm -rf greenlight
'
" "
- name: Build API - name: Build API