diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 994948d..2ab0cc9 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -23,10 +23,6 @@ jobs: with: go-version: "1.23" # adapte selon ta version - - name: Apply migrations - run: | - migrate -path=./migrations -database=$GREENLIGHT_DB_DSN up - - name: Build API run: | go mod tidy @@ -48,5 +44,7 @@ jobs: run: | ssh -p ${{ secrets.SERVER_PORT }} ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }} "\ pkill greenlight-api || true; \ + cd /var/www/greenlight; \ + migrate -path=./migrations -database=$GREENLIGHT_DB_DSN up \ nohup /var/www/greenlight/greenlight-api > /var/www/greenlight/greenlight.log 2>&1 & \ " \ No newline at end of file