From 2d503a528f1f4b86d63038974ce1bf0676135307 Mon Sep 17 00:00:00 2001 From: AJ Date: Tue, 14 Apr 2026 13:33:38 +0700 Subject: [PATCH] ci(gorgias): create remote aj/gorgias from main if missing The workflow previously checked out ref aj/gorgias, which fails when the branch was deleted or never pushed. Bootstrap the branch from main and push when absent so scheduled runs keep working. Made-with: Cursor --- .github/workflows/gorgias-docs-analysis.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gorgias-docs-analysis.yml b/.github/workflows/gorgias-docs-analysis.yml index aa6b059..09b7048 100644 --- a/.github/workflows/gorgias-docs-analysis.yml +++ b/.github/workflows/gorgias-docs-analysis.yml @@ -19,9 +19,20 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 with: - ref: aj/gorgias fetch-depth: 0 + - name: Ensure aj/gorgias branch exists on origin + run: | + git fetch origin main + if git ls-remote --heads origin aj/gorgias | grep -q .; then + git fetch origin aj/gorgias + git checkout aj/gorgias + else + echo "Remote branch aj/gorgias missing; creating from main and pushing." + git checkout -B aj/gorgias origin/main + git push -u origin aj/gorgias + fi + - name: Configure git run: | git config user.name "Gorgias Docs Bot"