chore: up #50
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: | |
| workflow_dispatch: | |
| push: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| defaults: | |
| run: | |
| shell: bash | |
| env: | |
| ACTIONS_RUNNER_DEBUG: true | |
| jobs: | |
| deploy: | |
| timeout-minutes: 3 | |
| runs-on: ['ubuntu-latest'] | |
| steps: | |
| - name: '🔑 Checkout' | |
| uses: actions/checkout@v4 | |
| - name: 'Setup pnpm' | |
| uses: pnpm/action-setup@v4 | |
| - name: 'Setup Node.js' | |
| uses: actions/setup-node@v4 | |
| with: | |
| cache: 'pnpm' | |
| node-version: 'lts/*' | |
| - name: 'Install Dependencies' | |
| run: pnpm install --frozen-lockfile | |
| - name: 'Lint, Check, Build' | |
| run: | | |
| pnpm dlx @biomejs/biome check . --reporter='github' | |
| pnpm build | |
| pnpm typecheck | |
| - name: '🔸 Cloudflare Workers - Deploy Server' | |
| working-directory: 'server' | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| run: | | |
| pnpm dlx wrangler@latest deploy --config='wrangler.toml' --env='production' --keep-vars | |
| - name: '🔸 Cloudflare Workers - Deploy Client' | |
| working-directory: 'client' | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| run: | | |
| pnpm dlx wrangler@latest deploy --config='wrangler.toml' |