From ca9b204ba763044d1229e9765f05d8e78224ff87 Mon Sep 17 00:00:00 2001 From: Maciek Sitkowski Date: Sun, 26 Nov 2023 20:54:38 +0100 Subject: [PATCH] use turbo for building --- .github/workflows/ci.yml | 30 ++++++++++++------------------ package.json | 21 +++++---------------- 2 files changed, 17 insertions(+), 34 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71a3b1d..5b2e8d6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -143,7 +143,7 @@ jobs: run: pnpm test:e2e build: - name: 🏗️ Build apps + name: 🏗️ Build needs: [changes] runs-on: ubuntu-latest steps: @@ -164,8 +164,14 @@ jobs: - name: 📥 Install Dependencies run: pnpm install - - name: 🏗️ Build apps - run: pnpm build:apps + - name: 🏗️ Build + run: pnpm build + + - uses: actions/upload-artifact@v3 + if: needs.changes.outputs.docs == 'true' + with: + name: docs-artifacts + path: ./apps/docs/build deploy-nestjs: name: 🐯 Deploy NestJS App @@ -217,22 +223,10 @@ jobs: with: fetch-depth: 0 - - name: Setup pnpm - uses: pnpm/action-setup@v2.4.0 + - name: Download docs artifacts + uses: actions/download-artifact@v3 with: - version: 8 - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: pnpm - - - name: 📥 Install Dependencies - run: pnpm install - - - name: 🏗️ Build - run: pnpm build:docs + name: docs-artifacts - name: 🚀 Deploy to Chromatic uses: chromaui/action@v1 diff --git a/package.json b/package.json index 4e32a85..de6847a 100644 --- a/package.json +++ b/package.json @@ -2,29 +2,18 @@ "name": "pnpm-monorepo", "private": true, "scripts": { - "build:apps": "pnpm --filter {'./apps/*'}... run build", - "build:docs": "pnpm -F docs... build", - "build:nestjs": "pnpm -F nestjs... build", - "build:remix": "pnpm -F remix... build", - "build:ui": "pnpm -F ui build", "build": "turbo run build", - "clean": "pnpx rimraf **/dist && pnpx rimraf **/node_modules && pnpx rimraf **/build", "deploy:nestjs": "fly deploy --config ./apps/nestjs/fly.toml --dockerfile ./apps/nestjs/Dockerfile", "deploy:remix": "fly deploy --config ./apps/remix/fly.toml --dockerfile ./apps/remix/Dockerfile", - "develop:docs": "pnpm -F docs develop", - "develop:nestjs": "pnpm -F nestjs develop", - "develop:remix": "pnpm -F remix... develop", - "develop:ui": "pnpm -F ui develop", - "develop": "pnpm -r develop", + "develop:docs": "turbo run develop --filter docs", + "develop:nestjs": "turbo run develop --filter nestjs", + "develop:remix": "turbo run develop --filter remix", + "develop:ui": "turbo run develop --filter ui", + "develop": "turbo run develop", "format": "prettier --write .", "lint": "turbo run lint", - "start:docs": "pnpm -F docs start", - "start:nestjs": "pnpm -F nestjs start", - "start:remix": "pnpm -F remix start", - "start": "pnpm -r start", "test": "turbo run test", "test:e2e": "turbo run test:e2e", - "test:nestjs": "pnpm -F nestjs test", "typecheck": "turbo run typecheck" }, "devDependencies": {