From 9f910b2c1eefee358b017ed6f0cb1685436e4769 Mon Sep 17 00:00:00 2001 From: Noah Date: Tue, 10 Feb 2026 19:10:54 -0500 Subject: [PATCH] fix deploy workflow for main branch --- .gitea/workflows/deploy.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 9ec5672..36ce362 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -12,9 +12,16 @@ jobs: - uses: actions/checkout@v4 - run: mkdir /tmp/deploy - run: rsync -ua --exclude=".*" . /tmp/deploy + - name: Set deploy branch + run: | + if [ "${{ github.ref_name }}" = "master" ]; then + echo "DEPLOY_BRANCH=main" >> "$GITHUB_ENV" + else + echo "DEPLOY_BRANCH=${{ github.ref_name }}" >> "$GITHUB_ENV" + fi - name: Build & Deploy Worker uses: cloudflare/wrangler-action@v3 with: apiToken: ${{ secrets.CF_API_TOKEN }} accountId: ${{ secrets.CF_ACCOUNT_ID }} - command: pages deploy /tmp/deploy --project-name=ctmesh-org --branch=${{ github.ref_name }} + command: pages deploy /tmp/deploy --project-name=ctmesh-org --branch=${{ env.DEPLOY_BRANCH }}