Dramatically optimize integrator tests for ultra-fast execution #6
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 Documentation to GitHub Pages | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - 'include/**' | |
| - 'examples/**' | |
| - 'docs/**' | |
| - 'Doxyfile' | |
| - 'tools/scripts/build_docs.sh' | |
| - '.github/workflows/docs-deploy.yml' | |
| workflow_dispatch: # Allow manual triggering | |
| schedule: | |
| - cron: '0 6 * * 1' # Weekly on Monday at 6 AM UTC | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Allow only one concurrent deployment | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y doxygen graphviz plantuml | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install sphinx sphinx-rtd-theme breathe exhale | |
| - name: Make build script executable | |
| run: chmod +x tools/scripts/build_docs.sh | |
| - name: Generate documentation | |
| run: | | |
| ./tools/scripts/build_docs.sh all | |
| - name: Create combined documentation site | |
| run: | | |
| mkdir -p _site | |
| cp -r docs/generated/html/* _site/ | |
| mkdir -p _site/sphinx | |
| cp -r docs/sphinx/_build/html/* _site/sphinx/ | |
| mkdir -p _site/api | |
| cp -r docs/api/* _site/api/ | |
| # Create a main index.html | |
| cat > _site/index.html << 'EOF' | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>DiffEq Documentation</title> | |
| <meta http-equiv="refresh" content="0; url=./annotated.html"> | |
| <style> | |
| body { font-family: Arial, sans-serif; margin: 40px; } | |
| .nav { background: #f5f5f5; padding: 20px; border-radius: 5px; } | |
| .nav h1 { color: #333; } | |
| .nav a { display: block; margin: 10px 0; padding: 10px; background: #007acc; color: white; text-decoration: none; border-radius: 3px; } | |
| .nav a:hover { background: #005a99; } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="nav"> | |
| <h1>DiffEq Documentation</h1> | |
| <p>If you are not redirected automatically, choose from:</p> | |
| <a href="./annotated.html">📚 API Reference (Doxygen)</a> | |
| <a href="./sphinx/index.html">📖 User Guide (Sphinx)</a> | |
| <a href="./api/README.md">🔧 API Documentation</a> | |
| <a href="https://github.com/WenyinWei/diffeq/tree/main/examples">💡 Examples</a> | |
| </div> | |
| </body> | |
| </html> | |
| EOF | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: '_site' | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |