42 lines
878 B
YAML
42 lines
878 B
YAML
name: Check-And-Deploy
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
run-linter:
|
|
name: Run linters
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check out Git repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 12
|
|
|
|
- name: Install Node.js dependencies
|
|
run: npm ci
|
|
|
|
- name: Run linters
|
|
uses: wearerequired/lint-action@v1
|
|
with:
|
|
eslint: true
|
|
|
|
build:
|
|
needs: run-linter
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: akhileshns/heroku-deploy@v3.12.12 # This is the action
|
|
with:
|
|
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
|
|
heroku_app_name: "gregs-rest-api-demo"
|
|
heroku_email: "gjcampbell777@gmail.com" |