From 0cd123a2d920cf47ad42ec498066e4a03820e140 Mon Sep 17 00:00:00 2001 From: Majk Shkurti Date: Fri, 20 Oct 2023 19:08:51 +0200 Subject: [PATCH] fix --- .github/actions/pnpm-cache-build/action.yml | 4 ++-- .github/workflows/checks.yml | 2 +- .github/workflows/nextjs-bundle-analysis.yml | 10 +++++----- .github/workflows/release.yml | 2 +- apps/web/Dockerfile | 14 +++++++------- playwright.config.ts | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/actions/pnpm-cache-build/action.yml b/.github/actions/pnpm-cache-build/action.yml index bb492484..65b936b4 100644 --- a/.github/actions/pnpm-cache-build/action.yml +++ b/.github/actions/pnpm-cache-build/action.yml @@ -7,7 +7,7 @@ # - name: 🏗️ Monorepo build # # uses: ./.github/actions/client-cache-build # # with: # -# cwd: ${{ github.workspace }}/apps/goat # (default = '.') # +# cwd: ${{ github.workspace }}/apps/web # (default = '.') # ######################################################################################## name: "Cache production build binaries" @@ -39,7 +39,7 @@ runs: key-4: ${{ github.sha }} with: path: | - ${{ github.workspace }}/apps/goat/.next + ${{ github.workspace }}/apps/web/.next **/.turbo/** **/dist/** key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-${{ env.key-3 }}-${{ env.key-4 }} diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index d942911b..61979ae1 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -45,7 +45,7 @@ jobs: with: filters: | client-goat: - - 'apps/goat/**' + - 'apps/web/**' - 'packages/**' - '.prettier*' - 'pnpm-lock.yaml' diff --git a/.github/workflows/nextjs-bundle-analysis.yml b/.github/workflows/nextjs-bundle-analysis.yml index 2ef85a9a..4dfd62fe 100644 --- a/.github/workflows/nextjs-bundle-analysis.yml +++ b/.github/workflows/nextjs-bundle-analysis.yml @@ -36,14 +36,14 @@ jobs: - name: 📊 Analyze bundle run: | - cd apps/goat + cd apps/web npx -p nextjs-bundle-analysis@0.5.0 report - name: 📤 Upload bundle uses: actions/upload-artifact@v3 with: name: bundle - path: ${{ github.workspace }}/apps/goat/.next/analyze/__bundle_analysis.json + path: ${{ github.workspace }}/apps/web/.next/analyze/__bundle_analysis.json - name: 📥 Download base branch bundle stats uses: dawidd6/action-download-artifact@v2 @@ -51,7 +51,7 @@ jobs: with: workflow: nextjs-bundle-analysis.yml branch: ${{ github.event.pull_request.base.ref }} - path: ${{ github.workspace }}/apps/goat/.next/analyze/base + path: ${{ github.workspace }}/apps/web/.next/analyze/base # And here's the second place - this runs after we have both the current and # base branch bundle stats, and will compare them to determine what changed. @@ -69,14 +69,14 @@ jobs: - name: 🔄 Compare with base branch bundle if: success() && github.event.number run: | - cd apps/goat + cd apps/web ls -laR .next/analyze/base && npx -p nextjs-bundle-analysis compare - name: 💬 Get comment body id: get-comment-body if: success() && github.event.number run: | - cd apps/goat + cd apps/web body=$(cat .next/analyze/__bundle_analysis_comment.txt) body="${body//'%'/'%25'}" body="${body//$'\n'/'%0A'}" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1e5ab5db..e44e5570 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,7 +30,7 @@ jobs: dockerhub-enable: true ghcr-enable: false push: ${{ github.event_name != 'pull_request' }} - file: ${{ github.workspace }}/apps/goat/Dockerfile + file: ${{ github.workspace }}/apps/web/Dockerfile image-names: | goatcommunity/goat-frontend diff --git a/apps/web/Dockerfile b/apps/web/Dockerfile index 2270feed..deee27ef 100644 --- a/apps/web/Dockerfile +++ b/apps/web/Dockerfile @@ -7,7 +7,7 @@ RUN apk update WORKDIR /app RUN npm install -g turbo COPY . . -COPY .env.docker /app/apps/goat/.env +COPY .env.docker /app/apps/web/.env RUN turbo prune --scope=@p4b/web --docker # Add lockfile and package.json's of isolated subworkspace @@ -34,15 +34,15 @@ RUN addgroup --system --gid 1001 nodejs RUN adduser --system --uid 1001 nextjs USER nextjs -COPY --from=installer /app/apps/goat/next.config.js . -COPY --from=installer /app/apps/goat/package.json . +COPY --from=installer /app/apps/web/next.config.js . +COPY --from=installer /app/apps/web/package.json . # Automatically leverage output traces to reduce image size # https://nextjs.org/docs/advanced-features/output-file-tracing -COPY --from=installer --chown=nextjs:nodejs /app/apps/goat/.next/standalone ./ -COPY --from=installer --chown=nextjs:nodejs /app/apps/goat/.next/static ./apps/goat/.next/static -COPY --from=installer --chown=nextjs:nodejs /app/apps/goat/public ./apps/goat/public +COPY --from=installer --chown=nextjs:nodejs /app/apps/web/.next/standalone ./ +COPY --from=installer --chown=nextjs:nodejs /app/apps/web/.next/static ./apps/web/.next/static +COPY --from=installer --chown=nextjs:nodejs /app/apps/web/public ./apps/web/public ENV HOSTNAME localhost -CMD node apps/goat/server.js +CMD node apps/web/server.js diff --git a/playwright.config.ts b/playwright.config.ts index b36cb7bf..71b2d759 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -41,7 +41,7 @@ export default defineConfig({ projects: [ { name: "@p4b/goat", - testDir: "./apps/goat/playwright", + testDir: "./apps/web/playwright", testMatch: /.*\.e2e\.tsx?/, expect: { timeout: DEFAULT_EXPECT_TIMEOUT,