1111 branches : " main"
1212jobs :
1313 test :
14- timeout-minutes : 15
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : Checkout code
18+ uses : actions/checkout@v4
19+
20+ - name : Set up Ruby
21+ uses : ruby/setup-ruby@v1
22+ with :
23+ bundler-cache : true
24+
25+ - name : Install pnpm
26+ uses : pnpm/action-setup@v4
27+ with :
28+ run_install : false
29+
30+ - name : Setup Node
31+ uses : actions/setup-node@v4
32+ with :
33+ node-version-file : " .node-version"
34+ cache : ' pnpm'
35+
36+ - name : Install dependencies
37+ run : |
38+ # sudo apt-get update
39+ # sudo apt-get install -y -qq libvips
40+ pnpm install
41+
42+ - name : Lint code for consistent style
43+ run : bundle exec standardrb
44+
45+ - name : Build and run dev container task
46+ uses : devcontainers/ci@v0.3
47+ with :
48+ imageName : ghcr.io/ruby-ui/web-devcontainer
49+ cacheFrom : ghcr.io/ruby-ui/web-devcontainer
50+ push : always
51+ runCmd : |
52+ bundle exec standardrb
53+ bin/rails test:prepare
54+ bin/rails db:test:prepare
55+ bin/rails test
56+
57+ docker-build :
58+ if : github.ref == 'refs/heads/main'
1559 runs-on : ubuntu-latest
1660 permissions :
1761 contents : read
@@ -34,36 +78,17 @@ jobs:
3478 imageName : ghcr.io/ruby-ui/web-devcontainer
3579 cacheFrom : ghcr.io/ruby-ui/web-devcontainer
3680 push : always
37- runCmd : |
38- bundle exec standardrb
39- bin/rails test:prepare
40- bin/rails db:test:prepare
41- bin/rails test
81+
4282
43- heroku -deploy :
44- if : ${{ github.event_name == 'push' && github. ref == 'refs/heads/PhlexUI-web' }}
45- needs : [test]
83+ next -deploy :
84+ if : github.ref == 'refs/heads/main'
85+ needs : [test, docker-build ]
4686 runs-on : ubuntu-latest
4787
4888 steps :
49- - uses : actions/checkout@v4
50- - name : Deploy to Heroku
51- uses : akhileshns/heroku-deploy@v3.14.15
89+ - name : Checkout code
90+ uses : actions/checkout@v4
5291 with :
53- branch : PhlexUI-web
54- heroku_api_key : ${{secrets.HEROKU_API_KEY}}
55- heroku_app_name : " phlex-ui-web"
56- heroku_email : " seth@statecert.com"
57-
58- fly-deploy :
59- if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
60- needs : [test]
61- name : Deploy app
62- runs-on : ubuntu-latest
63- concurrency : deploy-group
64- steps :
65- - uses : actions/checkout@v4
66- - uses : superfly/flyctl-actions/setup-flyctl@master
67- - run : flyctl deploy --remote-only
68- env :
69- FLY_API_TOKEN : ${{ secrets.FLY_API_TOKEN }}
92+ fetch-depth : 0
93+ - name : Deploy to Heroku Prod
94+ run : git push https://heroku:${{ secrets.HEROKU_RUBYUI_API_KEY }}@git.heroku.com/rubyui-next.git HEAD:main
0 commit comments