github-pages-directory-listing icon indicating copy to clipboard operation
github-pages-directory-listing copied to clipboard

Please add an option to overwrite existing directory listings

Open BillyTom opened this issue 11 months ago • 1 comments

I am glad that this Github Action exists. I am using it to upload html reports to a separate host that does not have directory listing enabled for security reasons, and this Action helps a great deal.

However, I noticed that this extension creates new index.html files, but does not update existing files. If a folder content changes after the index.html was created, then this change will not be reflected in the directory listing.

As a workaround I added a step that deletes all existing index.html files before I create the new directory listings:

- name: "[Deploy] Delete existing directory listings"
  run: rm -rf **/index.html
  working-directory: reports

- name: "[Deploy] Generate new directory listings"
  uses: jayanta525/github-pages-directory-listing@66df212efca9ee633e4a287f4a4c0ec01665de1a
  with:
    FOLDER: reports

It would be nice if this Github Action could do it on its own. Here is a mock up for a new parameter "overwrite":

- name: "[Deploy] Update directory listings"
  uses: jayanta525/github-pages-directory-listing@66df212efca9ee633e4a287f4a4c0ec01665de1a
  with:
    FOLDER: reports
    OVERWRITE: true

BillyTom avatar Mar 05 '24 12:03 BillyTom