Fix interactive layout #106
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
name: Build and Publish to NPM | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "*" | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- run: corepack enable | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "22.x" | |
cache: "yarn" | |
registry-url: "https://registry.npmjs.org" | |
- run: yarn install | |
- run: yarn build | |
- run: yarn pack -o package.tgz | |
- uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: package.tgz | |
- name: Setup Pages | |
uses: actions/configure-pages@v4 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
# Upload dist folder | |
path: "./dist" | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |
# Publish all dist at top level so that esm.sh can find web worker... | |
- run: npm publish --provenance --access public package.tgz | |
if: startsWith(github.ref, 'refs/tags/') | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: corepack enable | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "22.x" | |
cache: "yarn" | |
- run: yarn install | |
- run: yarn lint |