vercel-action
vercel-action copied to clipboard
Need to pass --confirm as arg for CLI v21
Thank you for providing this action, it's exactly what I was looking for.
I noticed that with the latest vercel CLI (21.0.1) you need to pass the --confirm
arg in the workflow, otherwise the CLI sits waiting for input inside the action.
Using this config, the action never completes:
name: deploy site
on:
push:
branches: [ main ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: amondnet/vercel-action@v20
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID}}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID}}
vercel-args: '--prod'
The action never completes, when cancelling it the following output can be seen:
Run amondnet/vercel-action@v20
set environment for vercel cli
/usr/local/bin/npx vercel --prod -t *** -m githubCommitSha=ec3cd1aca15787d778c42f4e91690b05a533f7fc -m githubCommitAuthorName=fiznool -m githubCommitAuthorLogin=fiznool -m githubDeployment=1 -m githubOrg=studiozeffa -m githubRepo=threadsforslack-site -m githubCommitOrg=studiozeffa -m githubCommitRepo=threadsforslack-site -m githubCommitMessage=Added Github Action -m githubCommitRef=refs/heads/main
Vercel CLI 21.0.1
Vercel CLI 21.0.1
? Set up and deploy “~/work/threadsforslack-site/threadsforslack-site”? [Y/n]
? Set up and deploy “~/work/threadsforslack-site/threadsforslack-site”? [Y/n]
Adding a --confirm
to the vercel-args
does the trick:
name: deploy site
on:
push:
branches: [ main ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: amondnet/vercel-action@v20
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID}}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID}}
vercel-args: '--prod --confirm'
@fiznool Is there vercel.json
inside the working directory?
https://github.com/amondnet/vercel-action#disable-vercel-for-github
Yes, there is.
Here's the repo: https://github.com/studiozeffa/threadsforslack-app
Can confirm I had the same issue, with a vercel.json
included in the project. I had to include the --confirm
flag to have my builds complete.