Skip to content

Workflow file for this run

# This workflow will generate static example content for deployment to GitHub Pages
name: Generate and Deploy Example Pages
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Also runs automatically when a new release is created
release:
types: [created]
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
# Single deploy job since we're just generating and deploying
deploy-example-pages:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/setup-node@v3.6.0
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- name: Install Dependencies
run: npm install
- name: Generate Example Pages
run: npm run example
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload Artifact
uses: actions/upload-pages-artifact@v1
with:
path: './example/docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1