Interview Prep/GitHub Actions/Workflows Not Triggering & Invalid Files

The "Run workflow" button for `workflow_dispatch` does not appear.

BeginnerTroubleshootingWorkflows Not Triggering & Invalid Files
Answer

Likely causes → The workflow with workflow_dispatch exists only on a feature branch, not on the default branch; or the file has a syntax error on the default branch.

Diagnose →

git show origin/main:.github/workflows/deploy.yml | yq '.on'
gh workflow list --all

Fix → Merge the workflow to the default branch; then you can dispatch it on any ref. From the CLI, gh workflow run deploy.yml --ref feature/x also works once the default branch knows the workflow.

Prevent → Add new manual workflows to the default branch first with a no-op job.

All GitHub Actions questions Roadmap: GitHub Actions

More on Workflows Not Triggering & Invalid Files