From ff2d7113d736fe5bee62a140e6b2699956cf1842 Mon Sep 17 00:00:00 2001 From: Andrii Date: Thu, 21 Nov 2024 14:55:59 +0200 Subject: [PATCH] remove unused code, add dependency to staging and production --- .github/workflows/ci.yml | 59 -------------------------------- .github/workflows/production.yml | 4 +++ .github/workflows/staging.yml | 4 +++ 3 files changed, 8 insertions(+), 59 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f2b326da3..7690053b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,29 +6,7 @@ on: - Rubocop push: - pull_request: - branches: - - develop - - master - types: - - closed - - release: - types: [published] - jobs: - rubocop: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: 3.3.5 - bundler-cache: true - cache-version: 1 - - name: Run rubocop - run: | - bundle exec rubocop rspec: needs: rubocop runs-on: ubuntu-latest @@ -95,40 +73,3 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} json-path: tmp/rspec_results.json if: always() - - deploy-to-staging: - needs: rspec - runs-on: ubuntu-latest - if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true - steps: - - uses: actions/checkout@v2 - - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: 3.3.5 - bundler-cache: true - - - uses: miloserdow/capistrano-deploy@v3 - with: - target: staging - deploy_key: ${{ secrets.STAGING_KEY_PASSWORD }} - enc_rsa_key_pth: config/credentials/staging_deploy_id_ed25519_enc - - deploy-to-production: - needs: rspec - runs-on: ubuntu-latest - if: github.event_name == 'release' && github.event.action == 'published' - steps: - - uses: actions/checkout@v2 - - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: 3.3.5 - bundler-cache: true - - - uses: miloserdow/capistrano-deploy@v3 - with: - target: production - deploy_key: ${{ secrets.PROD_DEPLOY_KEY }} diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml index d361aec7d..b224eb654 100644 --- a/.github/workflows/production.yml +++ b/.github/workflows/production.yml @@ -1,6 +1,10 @@ name: Production on: + workflow_run: + workflows: + - Rspec + branches: - master diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index dfd77a5ac..de918c7d3 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -1,6 +1,10 @@ name: Staging on: + workflow_run: + workflows: + - Rspec + branches: - develop types: