Fix main content layout: align with other sites (900px width, minimal… #7
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 GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'docs/**' | |
| - '.github/workflows/deploy-pages.yml' | |
| workflow_dispatch: # Allow manual trigger | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Allow only one concurrent deployment | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup D2 | |
| run: | | |
| curl -fsSL https://d2lang.com/install.sh | sh -s -- | |
| echo "$HOME/.local/bin" >> $GITHUB_PATH | |
| - name: Render D2 diagrams | |
| run: | | |
| cd docs/whitepaper | |
| mkdir -p assets/diagrams | |
| for diagram in diagrams/*.d2; do | |
| basename=$(basename "$diagram" .d2) | |
| echo "Rendering: $basename" | |
| # Skip if already a theme variant (has -light or -dark suffix) | |
| if [[ "$basename" == *-light || "$basename" == *-dark ]]; then | |
| d2 "$diagram" "assets/diagrams/${basename}.svg" | |
| else | |
| # Generate both light and dark themes | |
| d2 --theme=0 "$diagram" "assets/diagrams/${basename}-light.svg" | |
| d2 --theme=200 "$diagram" "assets/diagrams/${basename}-dark.svg" | |
| fi | |
| done | |
| echo "Generated diagrams:" | |
| ls -lh assets/diagrams/ | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docs | |
| 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 |