File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI/CD to Heroku
2+
3+ on :
4+ push :
5+ branches :
6+ - main # or your deployment branch
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v3
15+
16+ - name : Setup Node.js
17+ uses : actions/setup-node@v4
18+ with :
19+ node-version : 18 # use your project's Node version
20+
21+ - name : Install dependencies
22+ run : yarn install --frozen-lockfile
23+
24+ - name : TypeScript type check
25+ run : yarn tsc --noEmit
26+
27+ - name : Lint
28+ run : yarn lint # optional
29+
30+ - name : Run tests
31+ run : yarn test # optional
32+
33+ - name : Build the app
34+ run : yarn build
35+
36+ deploy :
37+ needs : build
38+ runs-on : ubuntu-latest
39+ steps :
40+ - uses : actions/checkout@v3
41+
42+ - name : Deploy to Heroku
43+ uses : akhileshns/heroku-deploy@v3.12.12
44+ with :
45+ heroku_api_key : ${{ secrets.HEROKU_API_KEY }}
46+ heroku_app_name : " backend-asadd2723"
47+ heroku_email : " https://backend-asadd2723-cf857d07e679.herokuapp.com/"
48+ usedocker : false # unless you're using a Dockerfile
You can’t perform that action at this time.
0 commit comments