From 20afff9a99da41c7b5f925f0a0178937b8abff42 Mon Sep 17 00:00:00 2001 From: javascriptizer Date: Mon, 3 Feb 2025 22:55:52 +0300 Subject: [PATCH] fix: migrations env --- .github/workflows/gymnote.yaml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/gymnote.yaml b/.github/workflows/gymnote.yaml index 8913ab4..ec871d7 100644 --- a/.github/workflows/gymnote.yaml +++ b/.github/workflows/gymnote.yaml @@ -112,19 +112,17 @@ jobs: sudo mv /home/$VPS_USER/apps/gymnote/migrations /root/apps/gymnote/migrations EOF - - name: Print database environment variables - run: | - echo "$DB_USER" - echo "$DB_PASSWORD" - - name: Run database migrations run: | - ssh -i deploy_key.pem -o StrictHostKeyChecking=no $VPS_USER@$VPS_HOST << 'EOF' - set -e - export GOOSE_DRIVER=clickhouse - export GOOSE_DBSTRING="tcp://$DB_USER:$DB_PASSWORD@$DB_HOST:$DB_PORT/$DB_NAME" - cd /root/apps/gymnote || exit 1 - goose -dir ./migrations/clickhouse up || exit 1 + ssh -i deploy_key.pem -o StrictHostKeyChecking=no $VPS_USER@$VPS_HOST << EOF + export VPS_USER=$VPS_USER + export VPS_HOST=$VPS_HOST + export GOOSE_DRIVER=clickhouse + export GOOSE_DBSTRING="tcp://$DB_USER:$DB_PASSWORD@$DB_HOST:$DB_PORT/$DB_NAME" + + set -e + cd /root/apps/gymnote || exit 1 + goose -dir ./migrations/clickhouse up || exit 1 EOF - name: Set up systemd service on VPS