Skip to content

Add a GitHub pages copy of the demo #2

Add a GitHub pages copy of the demo

Add a GitHub pages copy of the demo #2

Workflow file for this run

name: Publish Package to npmjs
on:
push:
branches:
- main
release:
types: [created]
jobs:
build:
if: ${{ github.event_name == 'release' }}
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- run: npm install -g npm
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
deploy:
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload Artifact
uses: actions/upload-pages-artifact@v2
with:
# upload entire directory
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2