For anyone else having trouble installing Netlify CLI in a Github/Forgejo pipeline, seeing the error directory not empty when trying to install Netlify CLI globally, try these instructions to install it locally:
npm install netlify-cli --save-devTo launch it, use npx:
npx netlify deploy ...