Skip to content

Commit

Permalink
Add github actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
denniskigen committed Mar 28, 2021
1 parent ab4b4e0 commit 478b84f
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: validate
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
build:
name: "Build"
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v2

- name: ⎔ Setup node
uses: actions/setup-node@v1
with:
node_version: 14

- run: npm install
- run: npm run lint
- run: npm run check
- run: npm run format
- run: npm run coverage
- run: npm run build -- --prod

- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: dist
path: |
dist
deploy:
name: "Deploy"
runs-on: ubuntu-latest
needs: build
steps:
- name: ⤵️ Download build artifacts from build job
uses: actions/download-artifact@v2
with:
name: dist
- uses: actions/checkout@v1
- uses: netlify/actions/cli@master
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
with:
args: deploy --dir=build --prod
secrets: '["NETLIFY_AUTH_TOKEN", "NETLIFY_SITE_ID"]'

codecov:
name: "Coverage"
runs-on: ubuntu-latest
needs: deploy
steps:
- uses: actions/checkout@master
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}

1 comment on commit 478b84f

@vercel
Copy link

@vercel vercel bot commented on 478b84f Mar 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.