From eac6f071f1d3d418e712a1a3de01999d50786a59 Mon Sep 17 00:00:00 2001 From: gitadmin Date: Thu, 21 Aug 2025 16:10:44 +0900 Subject: [PATCH] =?UTF-8?q?.gitea/workflows/deploy.yml=20=E3=82=92?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/deploy.yml | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 976e13c..3308d66 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -1,14 +1,28 @@ -name: Deploy krgm (auto) +name: Deploy krgm (main & previews) on: push: - branches: [ "main" ] + branches: + - main + - 'main_*' workflow_dispatch: jobs: - deploy: - runs-on: [ "native" ] + # https://krgm.so-manager-dev.com/ + deploy-main: + if: ${{ github.ref_name == 'main' }} + runs-on: ["native"] steps: - uses: actions/checkout@v4 - - name: Deploy to server - run: /usr/local/bin/deploy_krgm.sh \ No newline at end of file + - name: Deploy main + run: /usr/local/bin/deploy_krgm.sh + + # https://krgm.so-manager-dev.com/gitea/ + deploy-preview: + if: ${{ startsWith(github.ref_name, 'main_') }} + runs-on: ["native"] + steps: + - uses: actions/checkout@v4 + - name: Deploy preview for branch + run: BRANCH='${{ github.ref_name }}' /usr/local/bin/deploy_krgm_branch.sh + \ No newline at end of file