-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (34 loc) · 1.01 KB
/
deploy-heroku.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
name: Deploy to Heroku
on:
push:
branches:
- main
- OzPol* # Deploy any branch starting with 'OzPol'
- dev*
workflow_dispatch:
jobs:
deploy-to-heroku:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0 # Unshallow the repository
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20.x'
- name: Install dependencies
run: npm install
- name: Install Heroku CLI
run: curl https://cli-assets.heroku.com/install.sh | sh
- name: Authenticate with Heroku
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: heroku auth:token
- name: Deploy to Heroku
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: |
heroku git:remote -a probooker-app
git push https://heroku:${{ secrets.HEROKU_API_KEY }}@git.heroku.com/probooker-app.git HEAD:main