Search code examples
github-actionsadonis.js

preserving a folder from being removed at build by github-action


adonis js cleans build folder every time you trigger a new build as a result public upload folder will be removed this created a lot of issue for me and Im trying diffrent methods to solve this. Im not currently using github actions to build my project and I was wondering if it can help me on this matter by this order or somthing like this on every commit:

  1. copy build/tmp folder

  2. build project by running yarn build command

  3. past the copied folder from step 1 back to build/tmp


Solution

  • for those who came here like me, I found the configuration. You can change local disk configuration.

    /config/drive.ts

    { local: { root: Env.get('STORAGE_ROOT'), } }
    

    In this case I created a variable in the .env with the absolute path