feat(shadow): auto-discover all .dingo files and show progress #172
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 to GitHub Pages | |
| on: | |
| # Trigger on push to main branch | |
| push: | |
| branches: [ main ] | |
| # Allow manual trigger from Actions tab | |
| workflow_dispatch: | |
| # Required permissions for GitHub Pages deployment | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Allow one concurrent deployment | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| # Install pnpm FIRST (before Node.js setup) | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v3 | |
| with: | |
| version: 9 | |
| # Now setup Node.js with pnpm caching | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| cache-dependency-path: './langingpage/pnpm-lock.yaml' | |
| - name: Install, build, and upload | |
| uses: withastro/action@v5 | |
| with: | |
| path: ./langingpage | |
| package-manager: pnpm@latest | |
| node-version: 22 | |
| env: | |
| # Firebase config from GitHub secrets | |
| PUBLIC_FIREBASE_API_KEY: ${{ secrets.PUBLIC_FIREBASE_API_KEY }} | |
| PUBLIC_FIREBASE_AUTH_DOMAIN: ${{ secrets.PUBLIC_FIREBASE_AUTH_DOMAIN }} | |
| PUBLIC_FIREBASE_PROJECT_ID: ${{ secrets.PUBLIC_FIREBASE_PROJECT_ID }} | |
| PUBLIC_FIREBASE_STORAGE_BUCKET: ${{ secrets.PUBLIC_FIREBASE_STORAGE_BUCKET }} | |
| PUBLIC_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.PUBLIC_FIREBASE_MESSAGING_SENDER_ID }} | |
| PUBLIC_FIREBASE_APP_ID: ${{ secrets.PUBLIC_FIREBASE_APP_ID }} | |
| - name: Report build size | |
| working-directory: ./langingpage | |
| run: | | |
| echo "## 📦 Build Output Size" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| du -sh dist/ >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "### Top 10 Largest Files" >> $GITHUB_STEP_SUMMARY | |
| du -ah dist/ | sort -rh | head -10 >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| # Fail if build exceeds budget (20MB is reasonable for landing page with Firebase + React + Shiki) | |
| DIST_SIZE_MB=$(du -sm dist/ | cut -f1) | |
| echo "Total size: ${DIST_SIZE_MB}MB" | |
| if [ $DIST_SIZE_MB -gt 20 ]; then | |
| echo "❌ Build size (${DIST_SIZE_MB}MB) exceeds budget (20MB)" | |
| exit 1 | |
| else | |
| echo "✅ Build size (${DIST_SIZE_MB}MB) within budget (20MB)" | |
| fi | |
| deploy: | |
| 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 |