Tried using GH Actions to deploy, but
Tried using GH Actions to deploy, but since it's a monorepo, actors have
"dockerContextDir": "../../.."
, so it's impossible to use apify push
without an error (context dir cannot be outside of the actor root dir)9 Replies
rare-sapphire•5w ago
why not make the context dir local for each actor? "./"
We at Apify deploy from GitHub with monorepo. You actually don't need to set anything special, the git URL just needs to point to the folder where Actor is and that Actor must point to correct
dockerContextDir
and dockerfile
We also having testing versions where we update the branch to point to the PR head before building via APIYou mean using the built-in Github deploy?

If I do that, then automatic build can only work for one actor in the monorepo
No, we have custom GitHub Action workflows that use the Apify API to update versions, trigger builds, run test Actors etc. Hopefully we will eventually open-source it.
rare-sapphire•4w ago
@Lukas Krivka - I ended up building something similar.
But one thing I still can not automate is setting the actor icon! Any plans to create an endpoint for that too?
Do you see anything wrong with my workflow? It's pretty simple...
The problem is that for both of my actors,
dockerContextDir
points outside of the actor folder... (e.g. "dockerContextDir": "../../.."
). And that makes sense because it's a monorepo, so the context dir should be the root of the repo, not the root of the actor...
But then inevitably, I get this error:
ACTOR: ERROR: Actor context path "../../.." is outside of Actor root directory!Not sure how to reconcile this. Any tips would be useful @Lukas Krivka & @pavel 🙏
Just don't use
apify push
, instead simply call the build endpoint for those 2 Actors@Lukas Krivka Tried that already (making CURL requests to API). Error is the same
ACTOR: ERROR: Actor context path "../../.." is outside of Actor root directory!