Bird
0
0

You want to deploy your Flask app automatically after tests pass using GitHub Actions. Which step should you add to your workflow to deploy to Heroku?

hard📝 Best Practice Q15 of 15
Flask - Deployment
You want to deploy your Flask app automatically after tests pass using GitHub Actions. Which step should you add to your workflow to deploy to Heroku?
AAdd a step that runs 'pip install flask-heroku'
BAdd a step that runs 'heroku login' interactively
CAdd a step that copies files to a local folder
DAdd a step using 'akhileshns/heroku-deploy@v3.12.12' action with Heroku API key and app name
Step-by-Step Solution
Solution:
  1. Step 1: Understand automated deployment in GitHub Actions

    To deploy automatically, use a GitHub Action designed for Heroku deployment that accepts API keys and app name securely.
  2. Step 2: Identify correct deployment action

    The 'akhileshns/heroku-deploy@v3.12.12' action is a popular choice for Heroku deployment in GitHub workflows.
  3. Final Answer:

    Add a step using 'akhileshns/heroku-deploy@v3.12.12' action with Heroku API key and app name -> Option D
  4. Quick Check:

    Use Heroku deploy action with API key = A [OK]
Quick Trick: Use Heroku deploy GitHub Action with API key for auto deploy [OK]
Common Mistakes:
MISTAKES
  • Trying interactive login in CI
  • Copying files locally instead of deploying
  • Installing unrelated packages

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Flask Quizzes