chore: rebuild release-please PR #275
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: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: latest | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Build all packages | |
| run: bun run --filter './packages/*' build | |
| - name: Build all apps | |
| run: | | |
| for app in apps/*; do | |
| if [ "$app" == "apps/mcp-cafe24-admin-example" ]; then continue; fi | |
| if [ -d "$app" ] && [ -f "$app/package.json" ]; then | |
| echo "Building $app..." | |
| bun run --filter "./$app" build | |
| fi | |
| done | |
| - name: Merge all apps to deploy directory | |
| run: | | |
| mkdir -p deploy_dist | |
| for app in apps/*; do | |
| if [ "$app" == "apps/mcp-cafe24-admin-example" ]; then continue; fi | |
| if [ -d "$app" ]; then | |
| ( | |
| cd "$app" | |
| if [ -d "out" ]; then | |
| app_dir=$(basename $(pwd)) | |
| echo "Copying $app_dir..." | |
| cp -r out "../../deploy_dist/$app_dir" | |
| fi | |
| ) | |
| fi | |
| done | |
| - name: Generate index.html | |
| run: | | |
| cat > deploy_dist/index.html << 'EOF' | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>TS Workspace Examples</title> | |
| <style> | |
| body { | |
| font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; | |
| max-width: 800px; | |
| margin: 50px auto; | |
| padding: 0 20px; | |
| } | |
| h1 { color: #333; margin-bottom: 30px; } | |
| .app-list { list-style: none; padding: 0; } | |
| .app-item { | |
| margin: 15px 0; | |
| padding: 20px; | |
| border: 1px solid #e0e0e0; | |
| border-radius: 8px; | |
| transition: all 0.2s; | |
| } | |
| .app-item:hover { | |
| box-shadow: 0 2px 8px rgba(0,0,0,0.1); | |
| transform: translateY(-2px); | |
| } | |
| .app-link { | |
| text-decoration: none; | |
| color: #0366d6; | |
| font-size: 18px; | |
| font-weight: 500; | |
| } | |
| .app-link:hover { text-decoration: underline; } | |
| </style> | |
| </head> | |
| <body> | |
| <h1>📦 TS Workspace Examples</h1> | |
| <ul class="app-list"> | |
| EOF | |
| for app in apps/*; do | |
| if [ "$app" == "apps/mcp-cafe24-admin-example" ]; then continue; fi | |
| if [ -d "$app" ] && [ -f "$app/package.json" ]; then | |
| ( | |
| cd "$app" | |
| app_name=$(basename $(pwd)) | |
| echo " <li class=\"app-item\">" >> ../../deploy_dist/index.html | |
| echo " <a href=\"/pkgs/${app_name}/\" class=\"app-link\">" >> ../../deploy_dist/index.html | |
| echo " 🚀 ${app_name} →" >> ../../deploy_dist/index.html | |
| echo " </a>" >> ../../deploy_dist/index.html | |
| echo " </li>" >> ../../deploy_dist/index.html | |
| ) | |
| fi | |
| done | |
| cat >> deploy_dist/index.html << EOF | |
| </ul> | |
| </body> | |
| </html> | |
| EOF | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./deploy_dist | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ github.event.repository.homepage }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| uses: actions/deploy-pages@v4 |