Skip to content

ci: πŸ€– do not allow concurrent deploys #186

ci: πŸ€– do not allow concurrent deploys

ci: πŸ€– do not allow concurrent deploys #186

Workflow file for this run

name: Test & Deploy
on:
push:
branches:
- main
pull_request:
permissions:
actions: read
contents: read
jobs:
test-and-deploy:
name: πŸš€ Test & Deploy
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
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
- run: bunx nx-cloud start-ci-run --distribute-on="3 linux-large-js-bun"
- run: bunx nx-cloud record -- nx format:check
- run: bunx nx affected -t build lint test
- 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
echo "GOOGLE_APPLICATION_CREDENTIALS=$HOME/.firebase-sa.json" >> "$GITHUB_ENV"
- name: πŸš€ Deploy
if: github.ref == 'refs/heads/main'
run: bunx nx affected -t deploy --no-agents