refactor(event handling): Create new function #26
This file contains hidden or 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: Deploy Demo and Documentation | |
on: | |
push: | |
branches: | |
- main # Run on pushes to the main branch | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-website: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 'latest' | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm install | |
- name: Generate demo and documentation | |
run: npm run build-demo && npm run docs | |
- name: Setup Pages | |
uses: actions/configure-pages@v4 | |
- name: Upload demo and documentation to GitHub Pages | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: './dist' # Path where docs are generated | |
deploy: | |
needs: build-website | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
steps: | |
- name: Deploy to GitHub Pages | |
uses: actions/deploy-pages@v4 |