fix: worker kept open when it shouldn't #111
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
# GitHub Actions docs | |
# https://help.github.com/en/articles/about-github-actions | |
# https://help.github.com/en/articles/workflow-syntax-for-github-actions | |
name: CI | |
on: [push] | |
jobs: | |
build: | |
# Machine environment: | |
# https://help.github.com/en/articles/software-in-virtual-environments-for-github-actions#ubuntu-1804-lts | |
# We specify the Node.js version manually below, and use versioned Chrome from Puppeteer. | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Use Node.js 16x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
- name: Install dependencies | |
run: yarn --frozen-lockfile --non-interactive --no-progress | |
- name: Lint Demo | |
run: yarn demo:lint:check | |
- name: Format check | |
run: yarn prettier:check | |
- name: Check Readme | |
run: yarn readme:check | |
- name: Test | |
run: yarn lib:test:ci | |
- name: Coverage | |
uses: codecov/codecov-action@v2 | |
with: | |
fail_ci_if_error: true # optional (default = false) | |
directory: coverage | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Build | |
run: yarn lib:build:prod | |
- name: Incremental code quality checking | |
run: yarn betterer | |
- name: Build Demo | |
if: contains('refs/heads/master', github.ref) | |
run: | | |
yarn run demo:build:prod --progress=false --base-href "https://cloudnc.github.io/observable-webworker/" | |
yarn lib:build:prod | |
- name: Copy built README into dist | |
run: rm dist/observable-webworker/README.md && cp README.md dist/observable-webworker | |
- name: Copy LICENSE into dist | |
run: cp LICENSE dist/observable-webworker | |
- name: Release | |
if: contains('refs/heads/master refs/heads/next', github.ref) | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npx semantic-release | |
- name: Deploy | |
if: contains('refs/heads/master', github.ref) | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist/observable-webworker-demo |