Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
majkshkurti committed Oct 20, 2023
1 parent f022262 commit 0cd123a
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/actions/pnpm-cache-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
with:
filters: |
client-goat:
- 'apps/goat/**'
- 'apps/web/**'
- 'packages/**'
- '.prettier*'
- 'pnpm-lock.yaml'
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/nextjs-bundle-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,22 @@ 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
if: success() && github.event.number
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.
Expand All @@ -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'}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions apps/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0cd123a

Please sign in to comment.