Functions not being Executed
I am trying to publish a site to pages from a github action using https://github.com/cloudflare/pages-action. When I do that and provide
build/docs
as the directory, the build/docs/functions
directory inside of build/docs
does not seem to be picked up even though the rest of the site deploys. What am I doing wrong? Does the functions
directory need to be at the root of the repo?3 Replies
After some experimentation this appears to be the problem. Moving the functions directory to the root of the repo made the functions execute.
the functions directory needs to be in the root of wherever wrangler is called from, I suppose the action runs it from the repo root
Now that I'm slightly more awake @drangon. if you need to change this you can also set
workingDirectrory:
in the action: https://github.com/cloudflare/pages-action#specifying-a-working-directoryI see. I did not realize that is how it worked. I only skimmed the docs to be honest but did not see a clear mention that the functions directory must be in the directory wrangler is run from. Is that something that might need to be added as a note somewhere?