Ensure you ahve the following in the workflow you want to test:
on:
workflow_dispatch:
push:
Runn it with:
gh workflow run 'My Workflow Test' --ref my-test-branch
Ensure you install github CLI.
Now you don't have to corrupt your branches etc just to test something.