Skip to content

Commit

Permalink
Update nextjs.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kartikvirendrar authored Aug 28, 2024
1 parent 2f973d8 commit 0ab6299
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,20 @@ jobs:
- name: Detect package manager
id: detect-package-manager
run: |
cd frontend
if [ -f "yarn.lock" ]; then
if [ -f "${{ github.workspace }}/frontend/yarn.lock" ]; then
echo "manager=yarn" >> $GITHUB_OUTPUT
echo "command=install --force" >> $GITHUB_OUTPUT
echo "runner=yarn" >> $GITHUB_OUTPUT
elif [ -f "package.json" ]; then
exit 0
elif [ -f "${{ github.workspace }}/frontend/package.json" ]; then
echo "manager=npm" >> $GITHUB_OUTPUT
echo "command=install --force" >> $GITHUB_OUTPUT
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
exit 0
else
echo "Unable to determine package manager"
exit 1
fi
- name: Setup Node
uses: actions/setup-node@v4
Expand Down

0 comments on commit 0ab6299

Please sign in to comment.