Merge pull request #588 from Steinbeck-Lab/development #226
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
# GitHub Actions workflow to deploy documentation to GitHub Pages | |
name: Docs Deployment - GitHub Pages | |
# Trigger on manual dispatch or push to main branch | |
on: | |
workflow_dispatch: {} | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
# Job to build and deploy docs | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
# Checkout repository | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# Setup Node.js environment | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: npm | |
# Install dependencies | |
- run: npm ci | |
# Build documentation | |
- name: Build | |
run: npm run docs:build | |
# Debug build output | |
- name: Debug - Check build output | |
run: ls -l docs/.vitepress/dist | |
# Configure GitHub Pages | |
- uses: actions/configure-pages@v3 | |
# Upload static site artifact | |
- uses: actions/upload-pages-artifact@v3 | |
with: | |
path: docs/.vitepress/dist | |
# Deploy to GitHub Pages | |
- name: Deploy | |
id: deployment | |
uses: actions/deploy-pages@v4 | |