Skip to content

Commit e5c99ae

Browse files
authored
Merge pull request #305 from Study-Compass/AZ0228-patch-4
Create main.yml
2 parents b017934 + 787404b commit e5c99ae

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/main.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Manual Heroku Deploy
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
branch:
7+
description: 'Branch to deploy'
8+
required: true
9+
default: 'main'
10+
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v3
17+
with:
18+
submodules: true # <-- fetch submodules too
19+
ref: ${{ github.event.inputs.branch }}
20+
21+
- name: Set up Node.js
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: '22.x'
25+
26+
- name: Install dependencies
27+
run: npm install
28+
29+
- name: Build project (optional)
30+
run: npm run build
31+
32+
- name: Deploy to Heroku
33+
env:
34+
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
35+
run: |
36+
git remote add heroku https://heroku:[email protected]/<your-app-name>.git
37+
git push heroku HEAD:main --force

0 commit comments

Comments
 (0)