In GitHub → Settings → Secrets and variables → Actions, create these 3 secrets (not variables):
Create at vercel.com/account/tokens on the Vercel account that owns the project.
Run vercel link in the project, then check the .vercel/project.json file.
Alternative: Open the project in Vercel, and go to Settings → General. You'll find the ID's there.
Ensure that GitHub Actions is enabled for your GitHub project.
In this gist, the file .github__workflows__deploy.yml needs to be created as .github/workflows/deploy.yml (with the folders).
Important: If you previously linked a GitHub project in the Vercel project, you need to disconnect that. This will prevent commit pushes from creating "Blocked" deployments in Vercel before the GitHub Actions workflow runs.