If you are testing this repository from a fork, like with testing a Next.js build to GitHub Pages in your fork, it will fail since you don't have the GPG key.
You can give an invalid key, and this will fail the step but proceed with the publish. If you give a valid key, it will fail to sign.
Ideally, this should be as frictionless as possible for contributors like me who want to test the CI/CD workflows. We should be able to build the site and skip the package signing if we're in a fork or don't have the right repository secrets set.