diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 000000000..df4e18dd3 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,32 @@ +name: CD + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + concurrency: ${{ matrix.environment }} + environment: ${{ matrix.environment }} + + strategy: + matrix: + environment: [ production, staging ] + + steps: + - uses: actions/checkout@v4 + - uses: akhileshns/heroku-deploy@v3.12.12 + with: + heroku_api_key: ${{ secrets.HEROKU_API_KEY }} + heroku_app_name: ${{ secrets.HEROKU_APP_NAME }} + heroku_email: ${{ secrets.HEROKU_EMAIL }} + - uses: honeybadger-io/github-notify-deploy-action@v1 + with: + api_key: ${{ secrets.HONEYBADGER_API_KEY_RUBY }} + if: matrix.environment == 'production' + - uses: honeybadger-io/github-notify-deploy-action@v1 + with: + api_key: ${{ secrets.HONEYBADGER_API_KEY_JAVASCRIPT }} + if: matrix.environment == 'production' diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci.yml similarity index 94% rename from .github/workflows/ci-cd.yml rename to .github/workflows/ci.yml index b5f927a74..8d7337dfb 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci.yml @@ -1,10 +1,10 @@ -name: CI/CD +name: CI on: - push: + pull_request: branches: - main - pull_request: + merge_group: branches: - main concurrency: @@ -464,30 +464,3 @@ jobs: uses: re-actors/alls-green@release/v1 with: jobs: ${{ toJSON(needs) }} - - deploy: - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} - runs-on: ubuntu-latest - needs: [CI-status-report] - concurrency: ${{ matrix.environment }} - environment: ${{ matrix.environment }} - - strategy: - matrix: - environment: [ production, staging ] - - steps: - - uses: actions/checkout@v4 - - uses: akhileshns/heroku-deploy@v3.12.12 - with: - heroku_api_key: ${{ secrets.HEROKU_API_KEY }} - heroku_app_name: ${{ secrets.HEROKU_APP_NAME }} - heroku_email: ${{ secrets.HEROKU_EMAIL }} - - uses: honeybadger-io/github-notify-deploy-action@v1 - with: - api_key: ${{ secrets.HONEYBADGER_API_KEY_RUBY }} - if: matrix.environment == 'production' - - uses: honeybadger-io/github-notify-deploy-action@v1 - with: - api_key: ${{ secrets.HONEYBADGER_API_KEY_JAVASCRIPT }} - if: matrix.environment == 'production' diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml index 55fbb10b5..7cf670ac9 100644 --- a/.github/workflows/cla.yml +++ b/.github/workflows/cla.yml @@ -4,6 +4,9 @@ on: types: [created] pull_request_target: types: [opened,closed,synchronize] + merge_group: + branches: + - main permissions: actions: write