vercel-action
vercel-action copied to clipboard
Deploy Fails When Trigger is of Type Pull Request
I am getting a "Not Found" error when using the Github Action to kick off a deploy when using the pull request trigger. Here is the output I'm seeing (modified feature branch name and sha to make sure I'm not giving away any unnecessary information):
set environment for vercel cli
set env variable : VERCEL_ORG_ID
set env variable : VERCEL_PROJECT_ID
##[debug]head : [object Object]
##[debug]The head ref is: feature/example-branch
##[debug]The head sha is: example-sha
Error: Not Found
and here is the code from my workflow file:
name: Pull Request Opened, Synchronized, or Reopened
on:
pull_request
jobs:
buildAndDeploy:
# Using Vercel's Github Action to kick off deployments
# Documentation here: https://github.com/marketplace/actions/vercel-action
name: Build & Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout the current branch
uses: actions/checkout@v2
- uses: amondnet/vercel-action@v20
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
github-token: ${{ secrets.ACTIONS_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
scope: ${{ secrets.VERCEL_ORG_ID }}
github-comment: false
Yeah, this happened to me as well, did you find a solution?
This happened to me, as well, and ended up being because my GitHub Actions secrets were not properly set up. Maybe verify that you've got all the correct secrets.
This can happen if you're using a private repo and your Github token doesn't have the necessary scopes.