Skip to content

Instantly share code, notes, and snippets.

@ekpangmichael
Last active September 25, 2019 18:44
Show Gist options
  • Save ekpangmichael/7b0e9acb689b05112b0b073732c54346 to your computer and use it in GitHub Desktop.
Save ekpangmichael/7b0e9acb689b05112b0b073732c54346 to your computer and use it in GitHub Desktop.
name: CI
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 8.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: yarn install
run: |
yarn install
- name: yarn test
run: |
yarn test
env:
CI: true
- name: yarn build
run: |
yarn run build --if-present
- name: Add remote origin
run: |
git remote add heroku https://heroku:${{ secrets.HEROKU_API_KEY }}@git.heroku.com/${{ secrets.HEROKU_APP_NAME }}.git
- name: Deploy to Heroku
run: |
git push heroku HEAD:master -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment