'Github action: Stuck on "Start deployment (Y/n)?" - SAPUI5

We are trying to deploy a SAPUI5 application via github actions. Right now we call the deploy command via npm run deploy in the github action. The step wont proceed since it is asking the user to confirm the deployment.

Start deployment (Y/n)?

However, the third party script responsible for the deployment has no option to always default to "Y". Is there a way to let github actions enter a "Y" in such cases? Do you have another idea how to solve this problem?



Solution 1:[1]

Just use

yes | npm run deploy

This will automatically choose y when deploying.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Allan Chain