Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
yjaaidi committed Jun 6, 2024
1 parent b45ce96 commit 62dd944
Showing 1 changed file with 27 additions and 10 deletions.
37 changes: 27 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@ name: Test & Deploy

on:
push:
branches:
- main
pull_request:

permissions:
actions: read
contents: read

jobs:
test-and-deploy:
name: 🚀 Test & Deploy
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -32,13 +30,32 @@ jobs:
- run: bunx nx-cloud start-ci-run --distribute-on="3 linux-medium-js-bun"
- run: bunx nx-cloud record -- nx format:check
- run: bunx nx affected -t build lint test
- run: bunx nx-cloud stop-all-agents
- run: bunx nx-cloud complete-ci-run

deploy:
name: 🚀 Deploy
runs-on: ubuntu-latest
needs:
- test
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v3
with:
node-version: 21
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- run: bun install --frozen-lockfile --ignore-scripts

- uses: nrwl/nx-set-shas@v4

- name: Set up service account
if: github.ref == 'refs/heads/main'
env:
FIREBASE_SERVICE_ACCOUNT_MARMICODE_COOKBOOK: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_MARMICODE_COOKBOOK }}
run: echo $FIREBASE_SERVICE_ACCOUNT_MARMICODE_COOKBOOK > /firebase-sa.json
- run: nx affected -t deploy
if: github.ref == 'refs/heads/main'
run: echo $FIREBASE_SERVICE_ACCOUNT_MARMICODE_COOKBOOK > ~/.firebase-sa.json
- run: echo $GOOGLE_APPLICATION_CREDENTIALS && bunx nx deploy
env:
GOOGLE_APPLICATION_CREDENTIALS: /firebase-sa.json
GOOGLE_APPLICATION_CREDENTIALS: ~/.firebase-sa.json

0 comments on commit 62dd944

Please sign in to comment.