Skip to content

Commit

Permalink
fix: GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
riipandi committed Feb 19, 2025
1 parent 89f3675 commit b83c0b7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/setup-sdk/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ runs:
- uses: actions/setup-node@v4
with:
node-version: ${{ inputs.nodeVersion }}
cache: 'pnpm'

- uses: pnpm/action-setup@v4
with:
Expand Down
24 changes: 16 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,24 @@ jobs:
with:
# Automatically inject basePath in your Next.js configuration file and disable
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
# You may remove this line if you want to manage the configuration yourself.
static_site_generator: next

- if: ${{ steps.pnpm-cache.outputs.cache-hit != 'true' }}
name: Install and build
run: |
pnpm install --frozen-lockfile --ignore-scripts
pnpm run build
env:
NODE_ENV: production
- name: Restore cache
uses: actions/cache@v4
with:
path: |
.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
- name: Install dependencies
run: pnpm install --frozen-lockfile --ignore-scripts

- name: Build Next.js (fumadocs)
run: pnpm exec next build

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
Expand Down

0 comments on commit b83c0b7

Please sign in to comment.