This repository has been archived by the owner on Oct 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (49 loc) · 1.6 KB
/
main.yml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Deploy
on:
push:
branches:
- main
jobs:
BuildAndDeploy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'npm'
cache-dependency-path: react-app/package-lock.json
- name: Build React App
working-directory: react-app
run: npm install && CI=false npm run build
- uses: actions/setup-python@v3
with:
python-version: '3.9'
cache: 'pip'
- run: pip install pipenv
- name: Update requirements.txt for container install
run: pipenv lock -r > requirements.txt
- name: Login to Heroku Container
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: heroku container:login
- name: Build and push container
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: heroku container:push -a ${{ secrets.HEROKU_APP_NAME }} web
- name: Release container
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: heroku container:release -a ${{ secrets.HEROKU_APP_NAME }} web
- name: Run the database migration
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: heroku run -a ${{ secrets.HEROKU_APP_NAME }} flask db upgrade
- name: Erase all seed data
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: heroku run -a ${{ secrets.HEROKU_APP_NAME }} flask seed undo
- name: Seed your new data
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: heroku run -a ${{ secrets.HEROKU_APP_NAME }} flask seed all