-
Notifications
You must be signed in to change notification settings - Fork 352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version 16.x broke the build path resolution #5949
Comments
Note that a simple workaround is to add again the relative path:
But this is likely going to annoy people. |
Hey @CamiloTerevinto, first of all, sorry that we've broken your workflow, and thank you for raising this issue! Can you share more details about your repository, or if easily possible, share some reproducible example that helps us fix the issue?
|
I ran into this issue as well in an Nx monorepo: https://github.com/learnwithjason/learnwithjason.dev As of 16.x the Netlify CLI is trying to use the wrong directories to run e.g. |
Hey @lukasholzer, sorry I missed the notification for your comment.
- name: Run the ssg tool
run: ssg --output ${GITHUB_WORKSPACE}/out [other irrelevant params]
- name: Use Node.js 16.x
uses: actions/setup-node@v3
- name: Install the Netlify CLI
run: npm install netlify-cli -g
- name: Push to Netlify
run: netlify deploy --dir ./out --site [obfuscated] --prod --auth ${{secrets.NETLIFY_TOKEN}} The last step, which worked with the latest 15.x, used to be |
I also encountered this problem. If I'm not mistaken, I suspect at least this change to be part of the problem: 2006b6d#diff-37fc61d924cb730fc441c96ab07140dcf59d85503fdf7e1ce3d9154381eeb76dR78 Because we no longer use the cwd, and instead use the cli/src/commands/base-command.mjs Lines 742 to 747 in 6429080
For reference, I encountered this issue in a GitHub Action workflow which is something like this: # (...other jobs...)
jobs:
build-and-deploy:
steps:
# (...other steps...)
- name: Deploy to Netlify
run: |
npx --yes netlify-cli deploy \
--auth=$NETLIFY_AUTH_TOKEN \
--dir=build \
--prod \
--site=$NETLIFY_SITE_ID;
working-directory: ./path/to/subfolder Where the command should be executed within |
Seeing a related (?) issue in an npm monorepo environment: on 16.x
|
I'm having the same issue, cli log was like this previously (6th Aug CI build log);
Now, it's like this and failing (31th Aug CI build log);
Nothing has changed in the CI/CD code. |
Describe the bug
I have a GitHub action that does
cd ./out && netlify deploy --dir . --site *** --prod --auth ***
.Last week, using 15.x, this gave me a log of:
Now, it's giving a log of:
Which, of course, broke my site, as the expected files are in a sub-folder.
Steps to reproduce
Run
netlify deploy
passing the current directory (.
)Configuration
N/A
Environment
The text was updated successfully, but these errors were encountered: