-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (48 loc) · 1.56 KB
/
cicd.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
44
45
46
47
48
49
50
# name: CI-CD-workflow
# on: [ push, pull_request ]
# jobs:
# lint_and_test:
# name: Lint and Test
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Set up Node.js
# uses: actions/setup-node@v1
# with:
# node-version: 10
# - name: Install NPM dependencies
# run: npm ci
# - name: Lint code
# run: npm run lint
# - name: Run tests
# run: npm test
# deploy_to_staging:
# name: Deploy to staging
# runs-on: ubuntu-latest
# needs: [ lint_and_test ]
# if: github.ref == 'refs/heads/develop'
# env:
# HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY_STAGING }}
# steps:
# - uses: actions/checkout@v2
# - name: Login to heroku
# run: heroku container:login
# - name: Build and push
# run: heroku container:push -a ${{ secrets.HEROKU_APP_NAME_STAGING }} web
# - name: Release
# run: heroku container:release -a ${{ secrets.HEROKU_APP_NAME_STAGING }} web
# deploy_to_production:
# name: Deploy to production
# runs-on: ubuntu-latest
# needs: [ lint_and_test ]
# if: github.ref == 'refs/heads/master'
# env:
# HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
# steps:
# - uses: actions/checkout@v2
# - name: Login to heroku
# run: heroku container:login
# - name: Build and push
# run: heroku container:push -a ${{ secrets.HEROKU_APP_NAME }} web
# - name: Release
# run: heroku container:release -a ${{ secrets.HEROKU_APP_NAME }} web