actions-gh-pages icon indicating copy to clipboard operation
actions-gh-pages copied to clipboard

proposal: Questionable practise of directory usage especially for GHES usage

Open ghost opened this issue 4 years ago • 0 comments

Checklist

  • [X] I am using the latest version of this action.
  • [X] I have read the latest README and followed the instructions.
  • [X] I have read the latest GitHub Actions official documentation and learned the basic spec and concepts.

Describe your proposal

https://github.com/peaceiris/actions-gh-pages/blob/cc6f656fa11b5aaa8244bd13e169632ad352eb44/src/utils.ts#L22 is accessing a directory outside of the current _temp workspace directory which is created for each run.

This is not an issue on github.com as they have ephemeral runners that get destroyed or reset after each run. For GHES though the runners sometimes work for more than one job (maybe also a questionable practise) but then their disks run full because the directory from https://github.com/peaceiris/actions-gh-pages/blob/cc6f656fa11b5aaa8244bd13e169632ad352eb44/src/utils.ts#L22 is not wiped as its not part of the temporary workspace.

Describe the solution you'd like

I am happy/open to make a PR to refactor that logic, but I'd like to get advice first on why that architecture was chosen. Also, where would these files best belong if we make a generic PR (that does not accept the path as parameter but defaults to something inside the temporary workspace)?

Describe alternatives you've considered

Making a PR to hand in a parameter to define the working-directory from external.

Additional context

Our disks ran full that morning for 1 runner that lived quite a time and then our jobs started to fail on npm install as there was no disk space left.

ghost avatar Oct 14 '21 07:10 ghost