Update actions/checkout action to v6 #11
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 | |
| on: | |
| push: | |
| branches: ["main"] | |
| concurrency: | |
| group: deploy-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| CF_PAGES_PROJECT: ${{ secrets.CF_PAGES_PROJECT }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: "package.json" | |
| - uses: pnpm/action-setup@v4 | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run API tests | |
| run: pnpm --filter append-api test | |
| - name: Typecheck | |
| run: pnpm typecheck | |
| - name: Apply D1 migrations | |
| working-directory: packages/api | |
| run: pnpm exec wrangler d1 migrations apply append-db --remote --config wrangler.jsonc | |
| - name: Deploy Worker API | |
| working-directory: packages/api | |
| run: pnpm run deploy -- --config wrangler.jsonc | |
| - name: Build web | |
| working-directory: packages/web | |
| run: pnpm run build | |
| - name: Deploy web to Pages | |
| working-directory: packages/web | |
| # Omit --branch to deploy to Production (custom domains require Production deployment) | |
| run: pnpm exec wrangler pages deploy dist --project-name "$CF_PAGES_PROJECT" |