Skip to content
This repository was archived by the owner on Aug 23, 2025. It is now read-only.

release

release #447

Workflow file for this run

name: CI
on:
push:
branches:
- main
- beta
pull_request:
branches:
- main
- beta
# Needed for nx-set-shas within nx-cloud-main.yml, when run on the main branch
permissions:
actions: read
contents: read
jobs:
main:
if: >
github.event_name == 'push' ||
(github.event_name == 'pull_request' &&
(github.base_ref == 'main' || github.base_ref == 'beta'))
name: Nx Cloud - Main Job
uses: nrwl/ci/.github/workflows/nx-cloud-main.yml@v0.15
with:
main-branch-name: ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && 'main' || 'beta' }}
number-of-agents: 3
init-commands: |
npx nx-cloud start-ci-run --stop-agents-after="build" --agent-count=3
parallel-commands: |
npx nx-cloud record -- npx nx format:check
parallel-commands-on-agents: |
npx nx run-many --target=lint --all
npx nx run-many --target=test --all --parallel=3 --ci --coverage
npx nx run-many --target=build --all --parallel=3
final-commands: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t ${CODECOV_TOKEN}
agents:
if: >
github.event_name == 'push' ||
(github.event_name == 'pull_request' &&
(github.base_ref == 'main' || github.base_ref == 'beta'))
name: Nx Cloud - Agents
uses: nrwl/ci/.github/workflows/nx-cloud-agents.yml@v0.15
with:
number-of-agents: 3
cd:
name: Continuous Deployment
needs: [main, agents]
runs-on: ubuntu-latest
if: >
github.ref == 'refs/heads/main' ||
github.ref == 'refs/heads/beta' ||
(github.event_name == 'pull_request' && github.base_ref == 'beta')
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm ci
# We will deploy to dev so that cloudflare preview urls will point to the backend
# This will be a problem with multiple PRs, but hey we at least tried :)
- name: Deploy Dev
if: github.ref != 'refs/heads/beta' && github.ref != 'refs/heads/main'
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
run: NX_CLOUD_DISTRIBUTED_EXECUTION=false npx nx run backend:deploy:dev
- name: Deploy to Beta
if: github.ref == 'refs/heads/beta'
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
run: NX_CLOUD_DISTRIBUTED_EXECUTION=false npx nx run backend:deploy:beta
- name: Deploy to Prod
if: github.ref == 'refs/heads/main'
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
run: NX_CLOUD_DISTRIBUTED_EXECUTION=false npx nx run backend:deploy:prod