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.
65 lines
1.4 KiB
65 lines
1.4 KiB
name: ci
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16
|
|
cache: 'yarn'
|
|
|
|
- name: Install
|
|
run: yarn install --frozen-lockfile
|
|
|
|
- name: Test
|
|
run: yarn test
|
|
|
|
- name: Typecheck
|
|
run: yarn typecheck
|
|
|
|
- name: Lint
|
|
run: yarn lint
|
|
|
|
- name: Build
|
|
run: yarn build
|
|
|
|
demo:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16
|
|
cache: 'yarn'
|
|
|
|
- name: Install
|
|
run: yarn install --frozen-lockfile
|
|
|
|
- name: Build
|
|
run: yarn build_demo
|
|
|
|
- name: Deploy to Netlify
|
|
uses: nwtgck/actions-netlify@v1.2
|
|
with:
|
|
publish-dir: './demo/dist'
|
|
production-branch: master
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
deploy-message: 'Deploy from GitHub Actions'
|
|
enable-pull-request-comment: true
|
|
enable-commit-comment: false
|
|
overwrites-pull-request-comment: true
|
|
alias: ${{ github.head_ref }}
|
|
env:
|
|
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
|
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
|
timeout-minutes: 5
|