Bird
0
0

You have this GitHub Actions workflow snippet:

medium📝 Troubleshoot Q6 of 15
Django - Deployment and Production
You have this GitHub Actions workflow snippet:
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Install dependencies
        run: pip install -r requirements.txt
      - name: Run tests
        run: python manage.py test
      - name: Deploy
        run: ./deploy.sh
But the deploy step never runs even if tests pass. What is the most likely cause?
AThe deploy step is missing a dependency on the test step
BThe deploy step is incorrectly indented
CThe deploy script is not executable
DGitHub Actions does not support deploy steps
Step-by-Step Solution
Solution:
  1. Step 1: Check workflow step execution rules

    Steps run sequentially if previous steps succeed; deploy should run if tests pass.
  2. Step 2: Identify common deploy step issues

    If deploy script is not executable, it silently fails or does not run properly.
  3. Final Answer:

    The deploy script is not executable -> Option C
  4. Quick Check:

    Deploy step fails if script lacks execute permission [OK]
Quick Trick: Make deploy scripts executable with chmod +x [OK]
Common Mistakes:
MISTAKES
  • Assuming deploy step needs explicit dependency
  • Ignoring file permissions on deploy script
  • Believing GitHub Actions disallows deploy steps

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Django Quizzes