- run:cd ee/vulnerability-dashboard/ && npm run build-for-prod
# Commit newly-built assets locally so we can push them to Heroku below.
# (This commit will never be pushed to GitHub- only to Heroku.)
# > The local config flags make this work in GitHub's environment.
- run:git add ee/vulnerability-dashboard/.www
- run:git -c "user.name=GitHub" -c "user.email=github@example.com" commit -am 'AUTOMATED COMMIT - Deployed the latest, including modified HTML layouts and .sailsrc file that reference minified assets.'
# Configure the Heroku app we'll be deploying to
- run:heroku git:remote -a vulnerability-dashboard
- run:git remote -v
# Deploy to Heroku (by pushing)
# > Since a shallow clone was grabbed, we have to "unshallow" it before forcepushing.
- run:echo "Unshallowing local repository…"
- run:git fetch --prune --unshallow
- run:echo "Deploying branch '${GITHUB_REF##*/}' to Heroku…"
- run:git push heroku +${GITHUB_REF##*/}:master
- name:🌐 The dashboard has been deployed
run:echo '' && echo '--' && echo 'OK, done. It should be live momentarily.' && echo '(if you get impatient, check the Heroku dashboard for status)'