-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #441 from kpfromer/chore/add-github-actions
chore: add GitHub actions
- Loading branch information
Showing
2 changed files
with
36 additions
and
37 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 |
---|---|---|
@@ -1,20 +1,17 @@ | ||
name: Test and Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: [master] | ||
|
||
jobs: | ||
build: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set Node.js | ||
- name: Setup Node.js | ||
uses: actions/setup-node@master | ||
with: | ||
node-version: 10.x | ||
|
@@ -37,14 +34,16 @@ jobs: | |
|
||
- name: Test | ||
run: yarn coverage | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | ||
|
||
- name: Lint | ||
run: yarn lint | ||
|
||
- name: Build | ||
run: yarn build | ||
|
||
release: | ||
npm-release: | ||
# Only release on push to master | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
runs-on: ubuntu-latest | ||
|
@@ -53,7 +52,7 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set Node.js | ||
- name: Setup Node.js | ||
uses: actions/setup-node@master | ||
with: | ||
node-version: 10.x | ||
|
@@ -83,4 +82,31 @@ jobs: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
# TODO: deploy docs website | ||
docs-release: | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "10.x" | ||
|
||
- uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.GH_PAGES_DEPLOY }} | ||
|
||
- name: Release to GitHub Pages | ||
env: | ||
USE_SSH: true | ||
GIT_USER: git | ||
run: | | ||
cd website | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Kyle Pfromer" | ||
yarn install --frozen-lockfile | ||
yarn deploy |
This file was deleted.
Oops, something went wrong.