upload-pages-artifact icon indicating copy to clipboard operation
upload-pages-artifact copied to clipboard

Support path exclusion

Open mara004 opened this issue 3 years ago • 3 comments

When publishing Sphinx documentation, I noticed that the uploaded artifact is unnecessarily large because the .doctrees directory is included, so I tried to exclude it like this (as would be possible with upload-artifact):

- name: Upload artifact
  uses: actions/upload-pages-artifact@v1
  with:
    path: |
      docs/build/html
      !docs/build/html/.doctrees

However, with upload-pages-artifact, this yields an error when calling tar:

tar: docs/build/html\n!docs/build/html/.doctrees\n: Cannot open: No such file or directory

mara004 avatar Nov 05 '22 12:11 mara004

Workaround: Just remove the files to exclude. (In my case, this shrinked the artifact from 12 to 5 MB.)

mara004 avatar Nov 07 '22 11:11 mara004

Same issue for me - would be good if this action supports standard upload-artifact syntax

mswist avatar Mar 20 '23 09:03 mswist

bump

zumbiepig avatar Apr 25 '24 00:04 zumbiepig