Skip to content

Commit

Permalink
Merge origin into current branch
Browse files Browse the repository at this point in the history
  • Loading branch information
KseniaGovorun committed Dec 2, 2024
2 parents 3667cc5 + 00c77b7 commit 2f2d564
Show file tree
Hide file tree
Showing 53 changed files with 1,337 additions and 336 deletions.
56 changes: 53 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ name: CI
on:
push:

pull_request:
branches:
- develop
- master
types:
- closed

release:
types: [published]

jobs:
rubocop:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -50,16 +60,19 @@ jobs:
with:
ruby-version: 3.3.5
bundler-cache: true


- name: Update packages
run: sudo apt-get update

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libvips42 libvips-dev imagemagick
- uses: actions/setup-node@v1
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'
node-version: "14.x"
registry-url: "https://registry.npmjs.org"

- uses: nanasess/setup-chromedriver@master

Expand All @@ -81,3 +94,40 @@ 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 }}
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ inherit_gem:
AllCops:
SuggestExtensions: true
NewCops: enable
TargetRubyVersion: 3.0.6
TargetRubyVersion: 3.2

Layout/SpaceInsideHashLiteralBraces:
Enabled: true
Expand Down
1 change: 0 additions & 1 deletion Capfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@ require "capistrano/passenger"
require "capistrano/rails_tail_log"
require "capistrano/rails"
require "capistrano/rvm"
# require "capistrano/rbenv"

Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
Loading

0 comments on commit 2f2d564

Please sign in to comment.