diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml index 0ec9fe9..9191d5a 100644 --- a/.github/workflows/nextjs.yml +++ b/.github/workflows/nextjs.yml @@ -36,14 +36,14 @@ jobs: id: detect-package-manager run: | if [ -f "${{ github.workspace }}/frontend/yarn.lock" ]; then - echo "manager=./frontend/yarn" >> $GITHUB_OUTPUT - echo "command=./frontend/install" >> $GITHUB_OUTPUT - echo "runner=./frontend/yarn" >> $GITHUB_OUTPUT + echo "manager=yarn" >> $GITHUB_OUTPUT + echo "command=install" >> $GITHUB_OUTPUT + echo "runner=yarn" >> $GITHUB_OUTPUT exit 0 elif [ -f "${{ github.workspace }}/frontend/package.json" ]; then - echo "manager=./frontend/npm" >> $GITHUB_OUTPUT - echo "command=./frontend/ci" >> $GITHUB_OUTPUT - echo "runner=./frontend/npx --no-install" >> $GITHUB_OUTPUT + echo "manager=npm" >> $GITHUB_OUTPUT + echo "command=ci" >> $GITHUB_OUTPUT + echo "runner=npx --no-install" >> $GITHUB_OUTPUT exit 0 else echo "Unable to determine package manager" @@ -75,10 +75,13 @@ jobs: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}- - name: Install dependencies run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} + working-directory: frontend - name: Build with Next.js run: ${{ steps.detect-package-manager.outputs.runner }} next build + working-directory: frontend - name: Static HTML export with Next.js run: ${{ steps.detect-package-manager.outputs.runner }} next export + working-directory: frontend - name: Upload artifact uses: actions/upload-pages-artifact@v2 with: