shembull
shembull

Reputation: 13

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?

Upvotes: 1

Views: 1057

Answers (2)

Jerim Kaura
Jerim Kaura

Reputation: 1

I was doing the same kind of thing with Django. I tried this and it worked.

echo 'yes' | python manage.py collectstatic

The prompt was like mentioned below:

Image of terminal prompt

You have requested to collect static files at the destination
location as specified in your settings:

    /home/path-to-staticfiles/

This will overwrite existing files!
Are you sure you want to do this?

Type 'yes' to continue or 'no' to cancel: 

I was running the command from my github-actions. The 'yes' is automatically picked for the prompt.

Upvotes: 0

Allan Chain
Allan Chain

Reputation: 2835

Just use

yes | npm run deploy

This will automatically choose y when deploying.

Upvotes: 3

Related Questions