Multi-graph support with GraphManager and FROM clause #18
Workflow file for this run
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: Documentation | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ['v*'] | |
| pull_request: | |
| branches: [main] | |
| paths: ['docs/**'] | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install mdBook | |
| run: | | |
| mkdir -p $HOME/.local/bin | |
| curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.40/mdbook-v0.4.40-x86_64-unknown-linux-gnu.tar.gz | tar -xz -C $HOME/.local/bin | |
| echo "$HOME/.local/bin" >> $GITHUB_PATH | |
| - name: Get version info | |
| id: version | |
| run: | | |
| if [[ "$GITHUB_REF" == refs/tags/* ]]; then | |
| VERSION="${GITHUB_REF#refs/tags/}" | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "is_main=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "version=latest" >> $GITHUB_OUTPUT | |
| echo "is_main=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Build current docs | |
| working-directory: docs | |
| run: mdbook build | |
| - name: Fetch existing docs (for versioning) | |
| if: github.event_name == 'push' | |
| run: | | |
| mkdir -p _site | |
| # Try to fetch existing gh-pages content | |
| git fetch origin gh-pages:gh-pages 2>/dev/null || true | |
| if git rev-parse --verify gh-pages >/dev/null 2>&1; then | |
| git worktree add _site gh-pages | |
| fi | |
| - name: Organize versioned docs | |
| if: github.event_name == 'push' | |
| run: | | |
| VERSION="${{ steps.version.outputs.version }}" | |
| # For main branch, always update /latest/ | |
| # For tags, create versioned directory | |
| rm -rf _site/$VERSION | |
| mkdir -p _site/$VERSION | |
| cp -r docs/book/* _site/$VERSION/ | |
| # Generate versions.json only from main (tags just add their directory) | |
| if [[ "${{ steps.version.outputs.is_main }}" == "true" ]]; then | |
| cd _site | |
| { | |
| echo "[" | |
| echo " \"latest\"" | |
| for v in $(ls -d v[0-9]* 2>/dev/null | sort -Vr | head -10); do | |
| echo " ,\"$v\"" | |
| done | |
| echo "]" | |
| } > versions.json | |
| # Create index redirect to latest | |
| cat > index.html << 'EOF' | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta http-equiv="refresh" content="0; url=latest/"> | |
| <script>window.location.href = "latest/";</script> | |
| </head> | |
| <body> | |
| <p>Redirecting to <a href="latest/">latest documentation</a>...</p> | |
| </body> | |
| </html> | |
| EOF | |
| fi | |
| - name: Upload artifact | |
| if: github.event_name == 'push' | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: _site | |
| deploy: | |
| if: github.event_name == 'push' | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |