docs: update project status - all 4 phases complete #2
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: | |
| - 'docs/**' | |
| - 'README.md' | |
| - 'docs/.vitepress/**' | |
| - 'package.json' | |
| workflow_dispatch: | |
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Allow only one concurrent deployment | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| # Build job | |
| build: | |
| name: Build Documentation Site | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Full history for git-based features | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: 9 | |
| - name: Get pnpm store directory | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
| - name: Setup pnpm cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build documentation with VitePress | |
| run: pnpm docs:build | |
| env: | |
| NODE_ENV: production | |
| - name: Verify build output | |
| run: | | |
| echo "🔍 Verifying documentation build..." | |
| if [ ! -d "docs/.vitepress/dist" ]; then | |
| echo "❌ Build output directory not found!" | |
| exit 1 | |
| fi | |
| file_count=$(find docs/.vitepress/dist -type f | wc -l | tr -d ' ') | |
| echo "✅ Build successful! Generated $file_count files" | |
| # List key files | |
| echo "📄 Key files:" | |
| ls -lh docs/.vitepress/dist/index.html | |
| ls -lh docs/.vitepress/dist/assets/ | head -5 | |
| - name: Setup GitHub Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docs/.vitepress/dist | |
| # Deployment job | |
| deploy: | |
| name: Deploy to GitHub Pages | |
| 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 | |
| - name: Verify deployment | |
| if: success() | |
| run: | | |
| echo "✅ Documentation deployed successfully!" | |
| echo "🌐 Site URL: ${{ steps.deployment.outputs.page_url }}" | |
| echo "📖 View your documentation at: ${{ steps.deployment.outputs.page_url }}" | |
| - name: Notify on failure | |
| if: failure() | |
| run: | | |
| echo "❌ Deployment failed!" | |
| echo "Please check:" | |
| echo " 1. GitHub Pages is enabled in repository settings" | |
| echo " 2. Pages source is set to 'GitHub Actions'" | |
| echo " 3. Build completed successfully in previous job" | |
| echo " 4. Repository has pages:write permission" |