Skip to content

Commit

Permalink
fix: migrations env
Browse files Browse the repository at this point in the history
  • Loading branch information
javascriptizer1 committed Feb 3, 2025
1 parent 3d13f43 commit 20afff9
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/gymnote.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 20afff9

Please sign in to comment.