Skip to content

Commit 27515e3

Browse files
committed
Feature(github): add Github Actions
1 parent a59c17b commit 27515e3

File tree

2 files changed

+47
-2
lines changed

2 files changed

+47
-2
lines changed

.github/main.workflow

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
workflow "Deploy on Heroku" {
2+
on = "push"
3+
resolves = [
4+
"verify",
5+
]
6+
}
7+
8+
# Login
9+
action "login" {
10+
uses = "actions/heroku@master"
11+
args = "container:login"
12+
secrets = ["HEROKU_API_KEY"]
13+
}
14+
15+
# Push
16+
action "push" {
17+
needs = ["login"]
18+
uses = "actions/heroku@master"
19+
args = ["container:push", "--app", "$HEROKU_APP", "web"]
20+
secrets = ["HEROKU_API_KEY"]
21+
env = {
22+
HEROKU_APP = "express-react-typescript"
23+
}
24+
}
25+
26+
# Release
27+
action "deploy" {
28+
needs = ["push"]
29+
uses = "actions/heroku@master"
30+
args = ["container:release", "--app", "$HEROKU_APP", "web"]
31+
secrets = ["HEROKU_API_KEY"]
32+
env = {
33+
HEROKU_APP = "express-react-typescript"
34+
}
35+
}
36+
37+
# Verify
38+
action "verify" {
39+
needs = ["deploy"]
40+
uses = "actions/heroku@master"
41+
args = ["apps:info", "$HEROKU_APP"]
42+
secrets = ["HEROKU_API_KEY"]
43+
env = {
44+
HEROKU_APP = "express-react-typescript"
45+
}
46+
}

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
"stylelint": "stylelint \"**/*.css **/*.sass **/*.scss\"",
2323
"lint": "yarn eslint && yarn tslint && yarn stylelint",
2424
"test": "jest --runInBand --coverage",
25-
"coverage": "cat ./coverage/lcov.info | ./node_modules/.bin/coveralls",
26-
"deploy": "heroku container:push web"
25+
"coverage": "cat ./coverage/lcov.info | ./node_modules/.bin/coveralls"
2726
},
2827
"husky": {
2928
"hooks": {

0 commit comments

Comments
 (0)