From ec898afa4ace0be0be85b1143547acd5fa0a0a7f Mon Sep 17 00:00:00 2001 From: "Thomas F. K. Jorna" Date: Thu, 22 Oct 2026 14:08:04 +0200 Subject: [PATCH] ci: fix tag deploys, hardcode prod hostname and check out tags --- .github/workflows/deploy-stack.yml | 7 ++++++- .github/workflows/on_tag.yml | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-stack.yml b/.github/workflows/deploy-stack.yml index 64636c3ea..45690ef20 100644 --- a/.github/workflows/deploy-stack.yml +++ b/.github/workflows/deploy-stack.yml @@ -160,7 +160,12 @@ jobs: cd "${APP_DIR}" git fetch --prune --tags origin - git checkout --detach "origin/${BRANCH}" + # tag deploys pass the tag name, which has no origin/ ref + if git rev-parse --verify -q "origin/${BRANCH}" >/dev/null; then + git checkout --detach "origin/${BRANCH}" + else + git checkout --detach "refs/tags/${BRANCH}" + fi cd infra umask 077 diff --git a/.github/workflows/on_tag.yml b/.github/workflows/on_tag.yml index dbfab8130..519b6d398 100644 --- a/.github/workflows/on_tag.yml +++ b/.github/workflows/on_tag.yml @@ -82,7 +82,7 @@ jobs: action: deploy image_tag: ${{ github.ref_name }} stack_name: pubstar - hostname: ${{ vars.PROD_HOSTNAME }} + hostname: app.pubstar.org env_file: .env.enc stack_file: stack.yml uses_gateway: false