-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Unclear how the build command and the build directory are inferred #122
Comments
This action allows you to use - name: build
run: |
cd example/angular
npm ci
npx ng build --prod
{
"version": 2,
"public": false,
"github": {
"enabled": false
}
}
{
"routes": [
{ "src": "/(.*)", "dest": "/index.html" }
]
} or {
"rewrites": [{ "source": "/(.*)", "destination": "/index.html" }]
} |
Are you sure? My GitHub workflow doesn't have any build step but it still works fine. Vercel just does the build on its own, following the commands I set via the Vercel interface.
Where did you get this version number from? I browsed the Vercel docs but I found no configuration version mentioned.
Update: actually, I don't think the |
First of all, we need to know vercel's build steps. The build commands you set via vercel interface is not actually executed on your computer or github actions runner. It does it on vercel 's build machine(with amazon linux 2). Actual build time is same(approximately), but the vercel build time is additionally used. Build on vercel build machinegithub actions on github actions runner : 5 minutes
vercel build on vercel build machine : 5 minutes
You use 5 minutes for github actions and 5 minutes for vercel build. Build on github actions runnergithub actions on github actions runner : 5 minutes
vercel build on vercel build machine : 2 seconds
You use 5 minutes for github actions and 2 seconds for vercel build. It also has some limitations. If your build takes a long time and you do multiple builds, you will see a lot of queues. Hobby plan does only one build at a time. |
Amazing explanation, thanks so much for your help 🙏 Sorry to bother you with another question - but how can we disable the Vercel build? That is, what do I have to do on Vercel in order for the build to be executed just in GitHub Actions? |
Method 1: define the builds property in
|
Thanks so much for your help here. As per #136, it looks like you've also added instructions for how the build command works in the README. Therefore, I'm going to close this issue now. |
The README does not clarify what is it that this GitHub Action uses to:
I suspect that it's the
builds
androutes
field in thevercel.json
file that are doing the magic - but this should be clarified. There are cases in which users have to work around the basic example given in the README, e.g. in my case I am working on a monorepo and I have to create avercel.json
in each app directory (or at least this is what I think I should do).Side note: it looks like the Vercel docs recommend against using the
builds
field. functions should be used instead.Update: I think I figured it out .. is it that by passing a Vercel token and a project id, Vercel automatically knows what commands to run based on the build steps provided in the Vercel interface? If that's true, then what do we need the
builds
and theroutes
fields in thevercel.json
example given in this README?The text was updated successfully, but these errors were encountered: