From b57ea2b3f4e31f5c56c400d1ffbb1b6f94d6ef2a Mon Sep 17 00:00:00 2001 From: gentlementlegen Date: Mon, 4 Nov 2024 22:27:12 +0900 Subject: [PATCH] ci: set environment based on the branch Update the worker deploy workflow to differentiate between main and development branches. --- .github/workflows/worker-delete.yml | 1 + .github/workflows/worker-deploy.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/worker-delete.yml b/.github/workflows/worker-delete.yml index 89d3e23..5a9a43c 100644 --- a/.github/workflows/worker-delete.yml +++ b/.github/workflows/worker-delete.yml @@ -7,6 +7,7 @@ jobs: delete: runs-on: ubuntu-latest name: Delete Deployment + environment: ${{ github.ref == 'refs/heads/main' && 'main' || 'development' }} steps: - name: Setup Node uses: actions/setup-node@v4 diff --git a/.github/workflows/worker-deploy.yml b/.github/workflows/worker-deploy.yml index 1dcd4cf..7d9aff3 100644 --- a/.github/workflows/worker-deploy.yml +++ b/.github/workflows/worker-deploy.yml @@ -8,6 +8,7 @@ jobs: deploy-to-cloudflare: runs-on: ubuntu-latest name: Automatic Cloudflare Deploy + environment: ${{ github.ref == 'refs/heads/main' && 'main' || 'development' }} steps: - name: Setup Node uses: actions/setup-node@v4