You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.1 KiB
YAML

name: Deployment Pipeline
on:
push:
branches: [main]
pull_request:
branches: [main]
types: [opened, synchronize]
jobs:
deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run eslint
- name: Build
run: npm run build
- name: Test
run: npm test
- name: E2E tests
uses: cypress-io/github-action@v2
with:
command: npm run test:e2e
start: npm run start-test
wait-on: http://localhost:5000
- name: Deploy to Heroku
uses: akhileshns/heroku-deploy@v3.12.12
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: ${{secrets.HEROKU_APP}}
heroku_email: ${{secrets.HEROKU_API_EMAIL}}
healthcheck: "https://${{secrets.HEROKU_APP}}/health"
rollbackonhealthcheckfailed: true