Skip to content

Commit

Permalink
Merge pull request #441 from kpfromer/chore/add-github-actions
Browse files Browse the repository at this point in the history
chore: add GitHub actions
  • Loading branch information
kpfromer authored Aug 14, 2021
2 parents 6e3201c + 3b2f33b commit fdbf2f5
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 37 deletions.
46 changes: 36 additions & 10 deletions .github/workflows/test.yaml
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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

0 comments on commit fdbf2f5

Please sign in to comment.