-
Notifications
You must be signed in to change notification settings - Fork 10
43 lines (35 loc) · 1.12 KB
/
deploy.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
name: CD
on:
workflow_dispatch:
permissions: read-all
jobs:
deploy:
name: Deploy API to Production
if: ${{ github.repository == 'sws2apps/sws2apps-api' && github.ref == 'refs/heads/main' }}
environment:
name: Prod.env
url: https://api.sws2apps.com
runs-on: ubuntu-latest
steps:
- name: Checkout for release preparation
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: main
persist-credentials: false
- name: Use Node.js LTS version
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
with:
node-version: lts/Iron
- name: Install dependencies
run: npm ci
- name: Semantic Release
id: semantic
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
run: npx semantic-release
- name: Deploy API to Heroku
uses: akhileshns/heroku-deploy@581dd286c962b6972d427fcf8980f60755c15520
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: sws2apps
heroku_email: ${{secrets.HEROKU_EMAIL}}