-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (37 loc) · 1.22 KB
/
heroku.yaml
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
name: Deploy to Heroku
on:
push:
paths:
- bun.lockb
- package.json
- Dockerfile
- .github/workflows/heroku.yaml
- api/**
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set up Heroku CLI
run: curl https://cli-assets.heroku.com/install.sh | sh
- name: Set environment variables
run: |
touch .env
echo "TURSO_DATABASE_URL=${{ secrets.TURSO_DATABASE_URL }}" >> .env
echo "TURSO_AUTH_TOKEN=${{ secrets.TURSO_AUTH_TOKEN }}" >> .env
# echo "ELYSIA_API_PORT=80" >> .env
- name: Build Docker image
run: docker build -t ${{ secrets.HEROKU_APP_NAME }} .
- name: Authenticate with Heroku
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: heroku container:login
- name: Push Docker image to Heroku
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: |
heroku container:push web --app ${{ secrets.HEROKU_APP_NAME }}
heroku container:release web --app ${{ secrets.HEROKU_APP_NAME }}