diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 0594000..834e700 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -36,7 +36,10 @@ jobs: rm -rf quelle && mkdir quelle && cd quelle git init -q - git remote add origin "https://x-access-token:$TOKEN@${GITHUB_SERVER_URL#https://}/$GITHUB_REPOSITORY.git" + # Gitea meldet hier seine interne Adresse (http://192.168.1.5:3000), + # deshalb Schema und Rest getrennt behandeln statt https anzunehmen. + URL="${GITHUB_SERVER_URL%/}" + git remote add origin "${URL%%://*}://x-access-token:$TOKEN@${URL#*://}/$GITHUB_REPOSITORY.git" # Nach SHA, falls der Server das nicht erlaubt ersatzweise nach Branch. git fetch -q --depth 1 origin "$GITHUB_SHA" || git fetch -q --depth 1 origin "$GITHUB_REF_NAME" git checkout -q FETCH_HEAD