From 668e5c13faaa3f7b3b8578eed7d1f6e2ba8c081b Mon Sep 17 00:00:00 2001 From: Vladimir Enchev Date: Mon, 16 Mar 2026 13:32:27 +0200 Subject: [PATCH] app name fixed --- .github/workflows/deploy.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 67f9f67f4..9c71dc6b3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -68,10 +68,11 @@ jobs: run: | eval "$(ssh-agent -s)" echo "${{ secrets.DOKKU_SSH_PRIVATE_KEY }}" | ssh-add - - # DOKKU_REPO format: dokku@host:app-name REMOTE="${{ secrets.DOKKU_REPO }}" - HOST=$(echo "$REMOTE" | cut -d@ -f2 | cut -d: -f1) - APP_NAME=$(echo "$REMOTE" | cut -d: -f2) + # Extract app name (last path segment) and host, handling both + # ssh://dokku@host:port/app and dokku@host:app formats + APP_NAME=$(echo "$REMOTE" | sed 's|.*/||') + HOST=$(echo "$REMOTE" | sed 's|.*@||;s|[:/].*||') ssh -o StrictHostKeyChecking=no "dokku@${HOST}" config:set --no-restart "$APP_NAME" "GoogleMaps__ApiKey=${{ secrets.GOOGLE_MAPS_API_KEY }}" - name: Push to dokku