deta-deploy-action
deta-deploy-action copied to clipboard
Update action.yml
Remove the tmp/ directory before pushing to deta.
After a number of pushes i was hitting the following error
Deploying...
Error: failed to deploy: Request entity too large
Error: Process completed with exit code 1.
Removing the tmp/ directory seemed to resolve the error.
Uncertain, but my guess is that each deploy was containing the tmp for the previous deploy.
Hey @namur007 you've caught the problem and given a solution, but don't you think it would be better to delete the tmp
directory right in the step in which it was created (Clone Deta Metadata) rather than in 'Deploy to Deta' step?
@HarshKapadia2 I agree. Updated to reflect the change.
You're sure rm -rf tmp/
won't be required, right?
hi @HarshKapadia2 @namur007 @BogDAAAMN thanks for all the work!
The problem is mainly caused by the relative tmp
folder. We should not clone to ./tmp
as it will fail in cases where the Micro's code already has a tmp
folder; deta clone
will not clone to an existing non-empty directory.
I think the better solution will be to clone to /tmp/{micro-name}
(or $HOME/.deta/tmp/{micro-name}
if github doesn't allow creating a root tmp
dir)
-
mkdir -p /tmp/{micro-name}
-
deta clone --name {micro-name} --project {project-name} /tmp/{micro-name}
-
cp -r /tmp/{micro-name}/.deta .
Makes sense @aavshr!
Adding another step to delete the cloned Micro data is important to solve the original problem.
So the steps are:
mkdir -p /tmp/{micro-name}
deta clone --name {micro-name} --project {project-name} /tmp/{micro-name}
cp -r /tmp/{micro-name}/.deta .
-
rm -rf /tmp/{micro-name}
Hey @namur007 can you please make the required changes?
@namur007 @BogDAAAMN any updates?
Due to inactivity here, I created a new Action, which is a fork of this repository: HarshKapadia2/deta-deploy
Due to inactivity here, I created a new Action, which is a fork of this repository: HarshKapadia2/deta-deploy
Sorry. Yes. B I was having a problem with the clone command not wanting to clone to the root. I found a workable solution with the clone and remove method as discussed prior.
What was the solution you found @namur007? Can you send a link to it and/or explain it?