Skip to content

Commit

Permalink
chore: set up GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
soedirgo committed Sep 15, 2020
1 parent 54ea30c commit f61429b
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,31 @@
name: CI

on:
pull_request:
push:
branches:
- master
workflow_dispatch:

jobs:
test:
name: Test / OS ${{ matrix.os }} / Node ${{ matrix.node }}
strategy:
matrix:
os: [ubuntu-latest]
node: ['12']

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2

- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- name: Run tests
run: |
npm ci
npm t
37 changes: 37 additions & 0 deletions .github/workflows/docs.yml
@@ -0,0 +1,37 @@
name: Docs

on:
push:
branches:
- master
workflow_dispatch:

jobs:
docs:
name: Publish docs / OS ${{ matrix.os }} / Node ${{ matrix.node }}
strategy:
matrix:
os: [ubuntu-latest]
node: ['12']

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2

- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- run: |
npm ci
npm run docs

- name: Publish
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs
force_orphan: true
commit_message: 'docs: update'
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,31 @@
name: Release

on:
push:
branches:
- master
workflow_dispatch:

jobs:
release:
name: Release / Node ${{ matrix.node }}
strategy:
matrix:
node: ['12']

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- run: npm ci

- name: Create a release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit f61429b

Please sign in to comment.