docs: spec + plan for Astro 7 + Starlight migration #20
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: Build & Deploy | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| lint: | |
| name: Lint (sync, frontmatter, mermaid) | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install PowerShell | |
| uses: microsoft/powershell@v1 | |
| - name: Sync check | |
| run: pwsh scripts/sync-check.ps1 | |
| - name: Validate frontmatter | |
| run: pwsh scripts/validate-frontmatter.ps1 | |
| - name: Install mermaid-cli | |
| run: npm install -g @mermaid-js/mermaid-cli | |
| - name: Validate mermaid | |
| run: pwsh scripts/validate-mermaid.ps1 | |
| build: | |
| name: Build site | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install mdBook | |
| run: | | |
| curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.5.4/mdbook-v0.5.4-x86_64-unknown-linux-gnu.tar.gz | tar xz | |
| sudo mv mdbook /usr/local/bin/ | |
| - name: Install mdbook-mermaid | |
| run: | | |
| curl -sSL https://github.com/badboy/mdbook-mermaid/releases/latest/download/mdbook-mermaid-x86_64-unknown-linux-gnu.tar.gz | tar xz | |
| sudo mv mdbook-mermaid /usr/local/bin/ | |
| - name: Install PowerShell | |
| uses: microsoft/powershell@v1 | |
| - name: Install Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Build all | |
| run: pwsh scripts/build-all.ps1 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: dist | |
| deploy: | |
| name: Deploy to GitHub Pages | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| needs: build | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@v4 |