Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 61 additions & 15 deletions .github/workflows/main.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,17 @@ name: CI

on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
push:
branches: "main"
branches:
- "main"
- "released"
jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Set up Ruby
uses: ruby/setup-ruby@v1
Expand All @@ -25,6 +22,7 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10.8.0
run_install: false

- name: Setup Node
Expand All @@ -40,10 +38,44 @@ jobs:
run: bundle exec standardrb

- name: Run tests
run: |
bin/rails test:prepare
bin/rails db:test:prepare
bin/rails test
run: bin/rails db:test:prepare test

verify_components:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
run_install: false

- name: Setup Node
uses: actions/setup-node@v6
with:
node-version-file: ".node-version"
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: Build
run: bin/rails g ruby_ui:component:all --force true

- uses: CatChen/check-git-status-action@v1
with:
fail-if-not-clean: true
push-if-not-clean: false
request-changes-if-not-clean: false
targets: 'app'

docker-build:
if: github.ref == 'refs/heads/main'
Expand All @@ -54,7 +86,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
Expand All @@ -73,13 +105,27 @@ jobs:

next-deploy:
if: github.ref == 'refs/heads/main'
needs: [test, docker-build]
needs: [test, docker-build, verify_components]
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Deploy to Heroku Prod
- name: Deploy to Heroku Next
run: git push https://heroku:${{ secrets.HEROKU_RUBYUI_API_KEY }}@git.heroku.com/rubyui-next.git HEAD:main


released-deploy:
if: github.ref == 'refs/heads/released'
needs: [test]
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Deploy to Heroku Prod
run: git push https://heroku:${{ secrets.HEROKU_RUBYUI_API_KEY }}@git.heroku.com/rubyui.git HEAD:main
17 changes: 0 additions & 17 deletions .github/workflows/deploy.yml

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/verify_components.yml

This file was deleted.

1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ group :development do
# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
# gem "spring"
gem "standard"
gem "dockerfile-rails", ">= 1.6"
end

group :test do
Expand Down
3 changes: 0 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ GEM
debug (1.11.0)
irb (~> 1.10)
reline (>= 0.3.8)
dockerfile-rails (1.7.10)
rails (>= 3.0.0)
drb (2.2.3)
erb (6.0.0)
erubi (1.13.1)
Expand Down Expand Up @@ -332,7 +330,6 @@ DEPENDENCIES
capybara
cssbundling-rails (= 1.4.3)
debug
dockerfile-rails (>= 1.6)
jsbundling-rails (= 1.3.1)
lucide-rails (= 0.7.1)
phlex!
Expand Down
Loading