Skip to content

Update documentation site with Mermaid diagrams #27

Update documentation site with Mermaid diagrams

Update documentation site with Mermaid diagrams #27

Workflow file for this run

name: Deploy Documentation to GitHub Pages
on:
push:
branches:
- main
paths:
- 'docs_site/**'
- 'GUIDES/**'
- 'README.md'
- '.github/workflows/pages.yml'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN || secrets.PAGES_TOKEN || github.token }}
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
bundler-cache: true
working-directory: ./docs_site
- name: Setup Pages
uses: actions/configure-pages@v4
continue-on-error: true
- name: Build Jekyll site
working-directory: ./docs_site
env:
JEKYLL_ENV: production
run: |
set -e
REPO_NAME=$(echo ${{ github.repository }} | cut -d'/' -f2)
CURRENT_YEAR=$(date +%Y)
# Build Jekyll site (generates index.html from index.md)
# Suppress Sass deprecation warnings (they're harmless)
bundle exec jekyll build --baseurl "/$REPO_NAME" --quiet 2>&1 | grep -v "DEPRECATION WARNING" || true
# Verify build completed and index.html was generated
if [ ! -f "_site/index.html" ]; then
echo "❌ Build failed: index.html not generated in _site/"
exit 1
fi
echo "✅ Jekyll build complete: _site/index.html generated"
- name: Prepare artifact
run: |
set -e
REPO_NAME=$(echo ${{ github.repository }} | cut -d'/' -f2)
# Create artifact structure at root: $REPO_NAME/
mkdir -p $REPO_NAME
# Copy all built files from docs_site/_site/ to root $REPO_NAME/
cp -r docs_site/_site/* $REPO_NAME/ 2>/dev/null || true
# Verify index.html was copied successfully
if [ ! -f "$REPO_NAME/index.html" ]; then
echo "❌ Copy failed: index.html not found in $REPO_NAME/"
exit 1
fi
echo "✅ Artifact prepared: $REPO_NAME/index.html ready for deployment"
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ${{ github.event.repository.name }}
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
continue-on-error: true
- name: Deployment info
if: success()
run: |
REPO_NAME=$(echo ${{ github.repository }} | cut -d'/' -f2)
echo "✅ Deployment successful!"
echo "URL: https://${{ github.repository_owner }}.github.io/$REPO_NAME/"
echo "Wait 1-2 minutes for propagation, then clear cache if needed."
- name: Check deployment status
if: failure()
run: |
REPO_NAME=$(echo ${{ github.repository }} | cut -d'/' -f2)
echo "::warning::Deployment failed. Enable GitHub Pages: Settings → Pages → Source: GitHub Actions"
echo "Expected URL: https://${{ github.repository_owner }}.github.io/$REPO_NAME/"
exit 1