feat(docs,site): redesign landing + docs templates\n\n- Rustic-style … #54
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 | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - 'codeprism-docs/**' | |
| - 'docs/**' | |
| - '.github/workflows/deploy-docs.yml' | |
| workflow_dispatch: | |
| inputs: | |
| environment: | |
| description: 'Deployment environment' | |
| required: false | |
| default: 'production' | |
| type: choice | |
| options: | |
| - production | |
| - staging | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: deploy-docs-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| build-docs: | |
| name: Build Documentation | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| outputs: | |
| artifact-id: ${{ steps.upload.outputs.artifact-id }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'npm' | |
| cache-dependency-path: codeprism-docs/package-lock.json | |
| - name: Install dependencies | |
| shell: bash | |
| working-directory: codeprism-docs | |
| run: | | |
| echo "=== Installing Documentation Dependencies ===" | |
| npm ci | |
| echo "✅ Dependencies installed successfully" | |
| - name: Build documentation | |
| shell: bash | |
| working-directory: codeprism-docs | |
| run: | | |
| echo "=== Building Documentation ===" | |
| npm run build | |
| # Verify build output | |
| if [[ -d "build" ]]; then | |
| echo "✅ Documentation build successful" | |
| echo "📁 Build directory contents:" | |
| ls -la build/ | head -10 | |
| # Check build size | |
| build_size=$(du -sh build | cut -f1) | |
| echo "📊 Build size: $build_size" | |
| else | |
| echo "❌ Documentation build failed - no build directory" | |
| exit 1 | |
| fi | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Upload artifact | |
| id: upload | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: codeprism-docs/build | |
| deploy-docs: | |
| name: Deploy to GitHub Pages | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: [build-docs] | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |
| - name: Verify deployment and generate summary | |
| shell: bash | |
| run: | | |
| echo "=== Documentation Deployment Summary ===" | |
| echo "📚 **Documentation Deployed Successfully**" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "**Environment:** GitHub Pages" >> $GITHUB_STEP_SUMMARY | |
| echo "**URL:** [${{ steps.deployment.outputs.page_url }}](${{ steps.deployment.outputs.page_url }})" >> $GITHUB_STEP_SUMMARY | |
| echo "**Artifact ID:** \`${{ needs.build-docs.outputs.artifact-id }}\`" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "**Deployment Details:**" >> $GITHUB_STEP_SUMMARY | |
| echo "- Build completed at: \`$(date -u '+%Y-%m-%d %H:%M:%S UTC')\`" >> $GITHUB_STEP_SUMMARY | |
| echo "- Commit: \`${{ github.sha }}\`" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "> Documentation is now live and accessible to users!" >> $GITHUB_STEP_SUMMARY | |
| echo "✅ Documentation deployed successfully to: ${{ steps.deployment.outputs.page_url }}" |