cli
cli copied to clipboard
netlify link works locally but freezes in Github Actions (CI)
Describe the bug
Netlify CLI freezes the CI process during netlify link command.
Steps to reproduce
I was trying to deploy to Netlify using Netlify CLI with those commands in an NX executor:
netlify link --id my-site-id --debug
netlify deploy --debug --dir .
Github Actions runs minutes until some timeout of CI is reached and then it terminates.
If it terminates or if I abort, this is the last message I'm seeing
Adding local .netlify folder to .gitignore file... ? What would you like to do? (Use arrow keys) ❯ Link this directory to an existing site
- Create & configure a new site Linked to my-site-name-on-netlify in /home/runner/work/my-project/.netlify/state.json
The only way I get it working is adding .netlify/state.json to Git and removing the netlify link command.
Configuration
No response
Environment
Local: System: OS: Linux 5.10 Ubuntu 20.04.4 LTS (Focal Fossa) CPU: (4) x64 Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz Memory: 4.28 GB / 5.79 GB Container: Yes Shell: 5.0.17 - /bin/bash Binaries: Node: 16.15.0 - /usr/bin/node Yarn: 3.2.0 - ~/.yarn/bin/yarn npm: 8.5.5 - /usr/bin/npm
CI:
ubuntu-latest image with Node 16.15.0