feat: inject revision hash footer into proxied HTML responses #70
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: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.2.17 | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile --no-progress | |
| - name: Type check | |
| run: bun run type-check | |
| - name: Run tests | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: bun run test | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.2.17 | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile --no-progress | |
| - name: Build project | |
| run: bun run build | |
| - name: Check build output | |
| run: | | |
| echo "Build completed successfully" | |
| ls -la dist/ | |
| echo "Bundle size:" | |
| du -h dist/worker.js | |
| deploy: | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Deploy to Cloudflare Workers | |
| uses: cloudflare/wrangler-action@v3 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| wranglerVersion: "4.20.3" | |
| preCommands: wrangler whoami | |
| command: deploy |