Skip to content

Commit

Permalink
Merge branch 'develop' into 866-refresh-new-category
Browse files Browse the repository at this point in the history
  • Loading branch information
ktpe committed Nov 19, 2024
2 parents bb41c57 + 146f0f2 commit da0f138
Showing 1 changed file with 49 additions and 3 deletions.
52 changes: 49 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,14 +60,14 @@ jobs:
with:
ruby-version: 3.3.5
bundler-cache: true

- name: Install system dependencies
run: 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 @@ -79,3 +89,39 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
json-path: tmp/rspec_results.json
if: always()

deploy-to-develop:
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: development
deploy_key: ${{ secrets.DEV_DEPLOY_KEY }}

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 }}

0 comments on commit da0f138

Please sign in to comment.