github action deploy source by specified commitId

When I run workflow manually(workflow_dispatch), I can set commitId, and I want to deploy the specified commitId source to server. For example, In my master branch, I have the following commit history.

commitId(SHA) 744721d → 3015e2e → 35f7c38 → 942ba61 → 4ada177

master HEAD

Although my last commit is 4ada177, but I want to deploy 3015e2e source to my server. How can I do it.