Skip to content

Commit 8b3c1d5

Browse files
committed
add render github action
1 parent 648ee89 commit 8b3c1d5

File tree

3 files changed

+46
-3
lines changed

3 files changed

+46
-3
lines changed

.github/workflows/render.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: Render
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- main
8+
push:
9+
branches:
10+
- main
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: '20'
22+
cache: 'npm'
23+
24+
- uses: ruby/setup-ruby@v1
25+
with:
26+
bundler-cache: true
27+
28+
- run: |
29+
make setup
30+
make test
31+
32+
deploy:
33+
needs: build
34+
runs-on: ubuntu-latest
35+
if: ${{ github.event_name == 'push' }}
36+
37+
steps:
38+
- uses: actions/checkout@v4
39+
40+
- name: Deploy
41+
run: |
42+
"curl ${{ secrets.RENDER_DEPLOY_HOOK_URL }}"

.ruby-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ render-start:
1010
start:
1111
rm -rf tmp/pids/server.pid || true
1212
bin/rails s
13-
setup: install db-prepare
13+
14+
setup: install
15+
bin/rails assets:precompile
16+
make db-prepare
1417

1518
install:
1619
bin/setup
@@ -38,5 +41,4 @@ compose-production-run-app:
3841
compose-production-console:
3942
docker compose -p rails_bulletin_board_project_ru-production -f docker-compose.production.yml exec app bin/rails console
4043

41-
4244
.PHONY: test

0 commit comments

Comments
 (0)