Pin dependencies #1963
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/cd | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24.12.0 | |
| - run: corepack enable | |
| - name: find pnpm cache path | |
| id: cache | |
| run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.cache.outputs.path }} | |
| key: v1-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| v1-pnpm- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - run: node --run lint | |
| typecheck: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24.12.0 | |
| - run: corepack enable | |
| - name: find pnpm cache path | |
| id: cache | |
| run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.cache.outputs.path }} | |
| key: v1-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| v1-pnpm- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - run: node --run typecheck | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24.12.0 | |
| - run: corepack enable | |
| - name: find pnpm cache path | |
| id: cache | |
| run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.cache.outputs.path }} | |
| key: v1-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| v1-pnpm- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - run: node --run build | |
| - run: node --run test | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24.12.0 | |
| - run: corepack enable | |
| - name: find pnpm cache path | |
| id: cache | |
| run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.cache.outputs.path }} | |
| key: v1-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| v1-pnpm- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - run: node --run build | |
| deploy: | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: live | |
| url: https://dota.haglund.dev/v1/matches | |
| concurrency: | |
| group: live | |
| needs: | |
| - build | |
| - lint | |
| - test | |
| - typecheck | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24.12.0 | |
| - run: corepack enable | |
| - name: find pnpm cache path | |
| id: cache | |
| run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.cache.outputs.path }} | |
| key: v1-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| v1-pnpm- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - run: pnpm wrangler -j deploy | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} |