-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (38 loc) · 975 Bytes
/
fly.yaml
File metadata and controls
38 lines (38 loc) · 975 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Fly Deploy
on:
push:
branches:
- development
jobs:
deploy:
name: Deploy app
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14-alpine
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: root
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- name: Install
run: npm ci
- name: Create .env file
run: |
touch .env
echo DATABASE_URL=postgres://postgres:root@localhost:5432/postgres?schema=public >> .env
- name: Migrate DB
run: npm run migrate
- name: Seed DB
run: npm run seed
- run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}