@@ -34,51 +34,51 @@ jobs:
3434 - name : Detect package manager
3535 id : detect-package-manager
3636 run : |
37- if [ -f "${{ github.workspace }}/yarn.lock" ]; then
38- echo "manager=yarn" >> $GITHUB_OUTPUT
39- echo "command=install" >> $GITHUB_OUTPUT
40- echo "runner=yarn" >> $GITHUB_OUTPUT
41- exit 0
42- elif [ -f "${{ github.workspace }}/package.json" ]; then
43- echo "manager=npm" >> $GITHUB_OUTPUT
44- echo "command=ci" >> $GITHUB_OUTPUT
45- echo "runner=npx --no-install" >> $GITHUB_OUTPUT
46- exit 0
47- else
48- echo "Unable to determine package manager"
49- exit 1
50- fi
37+ echo "manager=npm" >> $GITHUB_OUTPUT
38+ echo "command=ci" >> $GITHUB_OUTPUT
39+ echo "runner=npx --no-install" >> $GITHUB_OUTPUT
5140 - name : Setup Node
5241 uses : actions/setup-node@v4
5342 with :
5443 node-version : " 20"
55- cache : ${{ steps.detect-package-manager.outputs.manager }}
44+ - name : Setup pnpm
45+ uses : pnpm/action-setup@v2
46+ with :
47+ version : 8
5648 - name : Setup Pages
49+ id : pages
5750 uses : actions/configure-pages@v5
58- with :
59- # Automatically inject basePath in your Next.js configuration file and disable
60- # server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
61- #
62- # You may remove this line if you want to manage the configuration yourself.
63- static_site_generator : next
51+ # with:
52+ # # Automatically inject basePath in your Next.js configuration file and disable
53+ # # server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
54+ # #
55+ # # You may remove this line if you want to manage the configuration yourself.
56+ # static_site_generator: next
57+ # generator_config_file: apps/docs/next.config.js
58+ - name : Dump Pages configuration
59+ run : |
60+ echo PAGES_BASE_URL: ${{ steps.pages.outputs.base_url }}
61+ echo PAGES_ORIGIN: ${{ steps.pages.outputs.origin }}
62+ echo PAGES_HOST: ${{ steps.pages.outputs.host }}
63+ echo PAGES_BASE_PATH: ${{ steps.pages.outputs.base_path }}
6464 - name : Restore cache
6565 uses : actions/cache@v4
6666 with :
6767 path : |
68- .next/cache
68+ apps/docs/ .next/cache
6969 # Generate a new cache whenever packages or source files change.
7070 key : ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
7171 # If source files changed but packages didn't, rebuild from a prior cache.
7272 restore-keys : |
7373 ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
7474 - name : Install dependencies
75- run : ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
75+ run : pnpm i
7676 - name : Build with Next.js
77- run : ${{ steps.detect-package-manager.outputs.runner }} next build
77+ run : pnpm --filter @medialit/docs build
7878 - name : Upload artifact
7979 uses : actions/upload-pages-artifact@v3
8080 with :
81- path : ./out
81+ path : ./apps/docs/ out
8282
8383 # Deployment job
8484 deploy :
0 commit comments