You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.1 KiB
41 lines
1.1 KiB
name: Node CI
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
node_version: [10.x, 12.x]
|
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- name: Use Node.js ${{ matrix.node_version }}
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: ${{ matrix.node_version }}
|
|
- run: yarn
|
|
- run: yarn run lint
|
|
- run: yarn run tsc
|
|
- run: yarn run build
|
|
- run: yarn run test:all
|
|
env:
|
|
CI: true
|
|
PROGRESS: none
|
|
NODE_ENV: test
|
|
NODE_OPTIONS: --max_old_space_size=4096
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
if: github.event == 'push' && github.ref == 'master'
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@master
|
|
|
|
- name: Build and Deploy
|
|
uses: JamesIves/github-pages-deploy-action@master
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}
|
|
BRANCH: gh-pages
|
|
FOLDER: "dist/"
|
|
BUILD_SCRIPT: npm install && npm run deploy
|
|
|