Netlify functions: build on repo

I’d like to build my project via github actions (containing all secrets and CI tests), and have netlify just pull it from the repo and put to hosting.
However, since I’m using netlify functions, I’m wondering if I’d be able to build netlify functions correctly on repo side without netlify cli.

I tried ‘netlify build’ and it says “Packaging Functions from serverlessFunctions directory”, but I don’t know where the packaged functions end up in my /dist folder.

Does the documentation help?

1 Like

Nope, it doesn’t specify where serverless functions go during ‘netlify build’ local build process.

My mistake. I thought this paragraph covered that.

Default directory
If you choose not to configure a folder for deploying Functions, Netlify will default to netlify/functions/ inside your site’s base directory. Any functions you save to YOUR_BASE_DIRECTORY/netlify/functions will deploy without any configuration required.

Indeed, netlify build seems to put the zipped functions not into the /dist folder, but into the .netlify/functions folder.

But I guess this means I’d have to manually deploy the server(less) functions to AWS :confused: .

Hi there, @MentalGear :wave:

It looks like this thread has been quiet for the last few weeks. I just wanted to check in to see if you had any questions about this still. Let us know!