Update Node dependencies (major) #325
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: Frontend Client CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - frontend/client/** | |
| - frontend/api/typescript/** | |
| - .github/workflows/ci-frontend-client.yaml | |
| - bun.lock | |
| pull_request: | |
| paths: | |
| - frontend/client/** | |
| - frontend/api/typescript/** | |
| - .github/workflows/ci-frontend-client.yaml | |
| - bun.lock | |
| workflow_dispatch: | |
| workflow_call: | |
| permissions: | |
| actions: read | |
| contents: read | |
| id-token: write | |
| env: | |
| GCP_PROJECT_ID: ${{ startsWith(github.ref_name, 'release/') && vars.GCP_PROJECT_ID_PROD || vars.GCP_PROJECT_ID_DEV }} | |
| GCP_PROJECT_NUMBER: ${{ startsWith(github.ref_name, 'release/') && vars.GCP_PROJECT_NUMBER_PROD || vars.GCP_PROJECT_NUMBER_DEV }} | |
| jobs: | |
| check: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2 | |
| with: | |
| bun-version-file: package.json | |
| - run: bun install | |
| working-directory: frontend/client | |
| - run: bun run lint | |
| working-directory: frontend/client | |
| deploy: | |
| needs: check | |
| runs-on: ubuntu-24.04 | |
| environment: ${{ github.event_name != 'pull_request' && (startsWith(github.ref_name, 'release/') && 'prod' || 'dev') || null }} | |
| env: | |
| DOCKER_PUSH: ${{ github.event_name != 'pull_request' && 'yes' || 'no' }} | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2 | |
| with: | |
| bun-version-file: package.json | |
| - run: bun install | |
| working-directory: frontend/client | |
| - name: build app | |
| run: bun run build | |
| working-directory: frontend/client | |
| env: | |
| PUBLIC_ENV__FIREBASE_APP: ${{ env.GCP_PROJECT_ID || 'cookchat-dev' }} | |
| PUBLIC_ENV__URL_BASE: https://alpha.cookchat.curioswitch.org/ | |
| PUBLIC_ENV__API_BASE: https://frontend-server-408496405753.asia-northeast1.run.app/ | |
| - if: ${{ env.DOCKER_PUSH == 'yes' }} | |
| uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0 | |
| with: | |
| workload_identity_provider: projects/${{ env.GCP_PROJECT_NUMBER }}/locations/global/workloadIdentityPools/github/providers/github | |
| project_id: ${{ env.GCP_PROJECT_ID }} | |
| service_account: firebase-deployer@${{ env.GCP_PROJECT_ID }}.iam.gserviceaccount.com | |
| - name: deploy app | |
| if: ${{ env.DOCKER_PUSH == 'yes' }} | |
| run: bun run firebase --project=${{ env.GCP_PROJECT_ID }} deploy | |
| working-directory: frontend/client |