Skip to content

Commit

Permalink
Feature(github): add Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Armour committed Feb 5, 2019
1 parent a59c17b commit 27515e3
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 2 deletions.
46 changes: 46 additions & 0 deletions .github/main.workflow
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
workflow "Deploy on Heroku" {
on = "push"
resolves = [
"verify",
]
}

# Login
action "login" {
uses = "actions/heroku@master"
args = "container:login"
secrets = ["HEROKU_API_KEY"]
}

# Push
action "push" {
needs = ["login"]
uses = "actions/heroku@master"
args = ["container:push", "--app", "$HEROKU_APP", "web"]
secrets = ["HEROKU_API_KEY"]
env = {
HEROKU_APP = "express-react-typescript"
}
}

# Release
action "deploy" {
needs = ["push"]
uses = "actions/heroku@master"
args = ["container:release", "--app", "$HEROKU_APP", "web"]
secrets = ["HEROKU_API_KEY"]
env = {
HEROKU_APP = "express-react-typescript"
}
}

# Verify
action "verify" {
needs = ["deploy"]
uses = "actions/heroku@master"
args = ["apps:info", "$HEROKU_APP"]
secrets = ["HEROKU_API_KEY"]
env = {
HEROKU_APP = "express-react-typescript"
}
}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
"stylelint": "stylelint \"**/*.css **/*.sass **/*.scss\"",
"lint": "yarn eslint && yarn tslint && yarn stylelint",
"test": "jest --runInBand --coverage",
"coverage": "cat ./coverage/lcov.info | ./node_modules/.bin/coveralls",
"deploy": "heroku container:push web"
"coverage": "cat ./coverage/lcov.info | ./node_modules/.bin/coveralls"
},
"husky": {
"hooks": {
Expand Down

0 comments on commit 27515e3

Please sign in to comment.