Courseiva
DeploymentmediumMultiple ChoiceObjective-mapped

CV0-004 Deployment Practice Question

A DevOps team is setting up a CI/CD pipeline using GitHub Actions. They want the pipeline to automatically deploy a containerized application to a Kubernetes cluster only when changes are pushed to the main branch. Which GitHub Actions component should they use to trigger the deployment?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

A workflow with an on.push trigger for the main branch

GitHub Actions workflows are defined in YAML and can include an 'on' trigger specifying events such as push to a branch. This allows automation of the deployment when code is pushed to main.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • A cron job that checks the repository every hour

    Why it's wrong here

    A scheduled trigger would be inefficient and not event-driven.

  • A GitHub webhook configured in the repository settings

    Why it's wrong here

    Webhooks are used to notify external services; GitHub Actions uses workflow triggers natively.

  • A pull request review requirement

    Why it's wrong here

    Pull request reviews do not trigger deployments automatically.

  • A workflow with an on.push trigger for the main branch

    Why this is correct

    Correct. The on.push event triggers the workflow on push to specified branches.

About these practice questions

This CV0-004 question is part of Courseiva's 977-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This CV0-004 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CV0-004 exam.