-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ab4b4e0
commit 478b84f
Showing
1 changed file
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
478b84f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: