Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vercel Deployment fails due to "missing input" #105

Closed
Jarmos-san opened this issue Sep 3, 2021 · 1 comment
Closed

Vercel Deployment fails due to "missing input" #105

Jarmos-san opened this issue Sep 3, 2021 · 1 comment

Comments

@Jarmos-san
Copy link

Thanks for the great work!

And this issue might as well be related to #26. The only diff though this issue isn't related to Dependabot PRs.

Expected behaviour is for this Action to deploy on each push-event (if configured as such). But it crashes for my project every time with the following error:

Run amondnet/vercel-action@v20
  with:
    vercel-args: --prod
    github-comment: true
    github-deployment: false
/home/runner/work/_actions/amondnet/vercel-action/v20/dist/index.js:2205
        throw new Error(`Input required and not supplied: ${name}`);
        ^

Error: Input required and not supplied: vercel-token
    at Object.getInput (/home/runner/work/_actions/amondnet/vercel-action/v20/dist/index.js:2205:15)
    at Object.679 (/home/runner/work/_actions/amondnet/vercel-action/v20/dist/index.js:24158:26)
    at __webpack_require__ (/home/runner/work/_actions/amondnet/vercel-action/v20/dist/index.js:22:30)
    at startup (/home/runner/work/_actions/amondnet/vercel-action/v20/dist/index.js:37:19)
    at /home/runner/work/_actions/amondnet/vercel-action/v20/dist/index.js:41:18
    at Object.<anonymous> (/home/runner/work/_actions/amondnet/vercel-action/v20/dist/index.js:44:10)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)

And I'm pretty sure the GitHub Secrets are configured correctly. Screenshot attached for reference:
image

For more reference on how I configured the Action, here's a code snippet:

      - name: Deploy to Vercel
        uses: amondnet/vercel-action@v20
        with:
          vercel-token: ${{ secrets.VERCEL_TOKEN }}
          vercel-args: "--prod"
          vercel-org-id: ${{ secrets.ORG_ID}}
          vercel-project-id: ${{ secrets.PROJECT_ID}}

What am I missing out on for it to crash that way? Or is there something else wrong here?

Do let me know if you need more information.

@Jarmos-san
Copy link
Author

GitHub added a feature wherein it's possible to configure both "Repository Secrets" & "Environment Secrets" separately. The difference between the two is explained pretty well in this SO answer.

The way to fix this rather subtle issue is to add the tokens under "Repository Secrets" & not the other one. Refer to screenshot below for further information.

image

For more information on creating GitHub Action Secrets refer to the official documentations on the same topic.

On that note, closing this thread as a non-issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant