Skip to content

Update update-or-create-contact-and-account.js #38

Update update-or-create-contact-and-account.js

Update update-or-create-contact-and-account.js #38

Workflow file for this run

name: Deploy hydroplane
on:
push:
branches: [ master ]
jobs:
build:
if: ${{ github.repository == 'mikermcneil/hydroplane' }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
# Configure our access credentials for the Heroku CLI
- uses: akhileshns/[email protected]
with:
heroku_api_key: ${{secrets.HEROKU_API_TOKEN_FOR_DEPLOYMENT}}
heroku_app_name: "" # this has to be blank or it doesn't work
heroku_email: ${{secrets.HEROKU_EMAIL_FOR_DEPLOYMENT}}
justlogin: true
- run: heroku auth:whoami
# Set the Node.js version
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
# Now start building!
- run: rm -rf package-lock.json node_modules/
# Get dependencies (including dev deps)
- run: cd ./ && npm install
# Run sanity checks
- run: cd ./ && npm test
# Compile assets
- run: cd ./ && 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 ./.www
- run: git -c "user.name=GitHub" -c "[email protected]" 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 hydroplane
- 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: 🌐 https://hydroplane.herokuapp.com/
run: echo '' && echo '--' && echo 'OK, done. It should be live momentarily.' && echo '(if you get impatient, check the Heroku dashboard for status)' && echo && echo ' 🌐–• https://hydroplane.herokuapp.com/'