Skip to content

Commit

Permalink
ci: test
Browse files Browse the repository at this point in the history
  • Loading branch information
besscroft committed Nov 27, 2024
1 parent 4f992a4 commit 358d354
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,6 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 20
- name: Set Build Cache
uses: actions/cache@v4
with:
# See here for caching with `yarn` https://github.com/actions/cache/blob/main/examples.md#node---yarn or you can leverage caching with actions/setup-node https://github.com/actions/setup-node
path: |
~/.npm
${{ github.workspace }}/.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
Expand Down
11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,18 @@ ENV NODE_ENV production
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs

COPY ./node_modules ./node_modules
COPY ./public ./public
COPY ./prisma ./prisma
COPY ./script.sh ./script.sh
COPY public ./public
COPY prisma ./prisma
COPY script.sh ./script.sh

RUN chmod +x script.sh
RUN mkdir .next
RUN chown nextjs:nodejs .next

# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --chown=nextjs:nodejs ./.next/standalone ./
COPY --chown=nextjs:nodejs ./.next/static ./.next/static
COPY --chown=nextjs:nodejs .next/standalone ./
COPY --chown=nextjs:nodejs .next/static ./.next/static

USER nextjs

Expand Down

0 comments on commit 358d354

Please sign in to comment.