From 124b3e1a07aa1269d9003d5a0d23a000dbebeef7 Mon Sep 17 00:00:00 2001 From: maalni Date: Fri, 29 Nov 2024 19:55:44 +0900 Subject: [PATCH] chore: move staging to main branch (#635) --- .github/dependabot.yml | 2 -- .github/workflows/check-code-quality.yml | 8 ++++---- .github/workflows/delete-redundant-deployments.yml | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 150ceeb5..73c25048 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,10 +6,8 @@ updates: directory: /.github/ schedule: interval: daily - target-branch: staging - package-ecosystem: npm directory: / schedule: interval: daily versioning-strategy: increase - target-branch: staging diff --git a/.github/workflows/check-code-quality.yml b/.github/workflows/check-code-quality.yml index 1454713a..f33fe964 100644 --- a/.github/workflows/check-code-quality.yml +++ b/.github/workflows/check-code-quality.yml @@ -5,7 +5,7 @@ on: push: branches: - main - - staging + - production pull_request: branches: - '**' @@ -46,7 +46,7 @@ jobs: build: needs: [check-typescript, check-prettier] runs-on: ubuntu-latest - environment: ${{ vars.CLOUDFLARE_PROJECT_NAME }} ${{ (github.ref == 'refs/heads/main' && '(Production)') || '(Preview)' }} + environment: ${{ vars.CLOUDFLARE_PROJECT_NAME }} ${{ (github.ref == 'refs/heads/production' && '(Production)') || '(Preview)' }} env: VITE_BACKEND_URL: ${{ vars.BACKEND_URL }} steps: @@ -92,7 +92,7 @@ jobs: cloudflare-project-name: ${{ vars.CLOUDFLARE_PROJECT_NAME }} directory: 'build' github-token: ${{ secrets.GITHUB_TOKEN }} - github-environment: ${{ vars.CLOUDFLARE_PROJECT_NAME }} ${{ (github.ref == 'refs/heads/main' && '(Production)') || '(Preview)' }} + github-environment: ${{ vars.CLOUDFLARE_PROJECT_NAME }} ${{ (github.ref == 'refs/heads/production' && '(Production)') || '(Preview)' }} - name: 'Delete old deployments' uses: andykenward/github-actions-cloudflare-pages/delete@v2.4.1 with: @@ -101,5 +101,5 @@ jobs: cloudflare-account-id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} cloudflare-project-name: ${{ vars.CLOUDFLARE_PROJECT_NAME }} github-token: ${{ secrets.GITHUB_TOKEN }} - github-environment: ${{ vars.CLOUDFLARE_PROJECT_NAME }} ${{ (github.event.pull_request.head.ref == 'refs/heads/main' && '(Production)') || '(Preview)' }} + github-environment: ${{ vars.CLOUDFLARE_PROJECT_NAME }} ${{ (github.event.pull_request.head.ref == 'refs/heads/production' && '(Production)') || '(Preview)' }} diff --git a/.github/workflows/delete-redundant-deployments.yml b/.github/workflows/delete-redundant-deployments.yml index cbbe9444..5d62bc47 100644 --- a/.github/workflows/delete-redundant-deployments.yml +++ b/.github/workflows/delete-redundant-deployments.yml @@ -23,4 +23,4 @@ jobs: cloudflare-account-id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} cloudflare-project-name: ${{ vars.CLOUDFLARE_PROJECT_NAME }} github-token: ${{ secrets.GITHUB_TOKEN }} - github-environment: ${{ vars.CLOUDFLARE_PROJECT_NAME }} ${{ (github.event.pull_request.head.ref == 'refs/heads/main' && '(Production)') || '(Preview)' }} + github-environment: ${{ vars.CLOUDFLARE_PROJECT_NAME }} ${{ (github.event.pull_request.head.ref == 'refs/heads/production' && '(Production)') || '(Preview)' }}