fix: update GraphQL mutation input type and clean up comments and add… #108
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: Backend CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - 'backend/**' | |
| - 'codefox-common/**' | |
| pull_request: | |
| branches: [ main ] | |
| paths: | |
| - 'backend/**' | |
| - 'codefox-common/**' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: Install and Build Backend | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18' | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: 8 | |
| run_install: false | |
| - name: Get pnpm store directory | |
| id: pnpm-cache | |
| run: | | |
| echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| - name: Setup pnpm cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Install dependencies | |
| run: pnpm install --no-frozen-lockfile | |
| - name: Build codefox-common | |
| working-directory: ./codefox-common | |
| run: pnpm build | |
| - name: Build backend | |
| working-directory: ./backend | |
| run: pnpm build | |
| - name: Cache build artifacts | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ./backend/dist | |
| ./backend/node_modules | |
| key: ${{ runner.os }}-backend-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-backend-${{ hashFiles('**/pnpm-lock.yaml') }}- |