Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add an option to overwrite existing directory listings #9

Open
BillyTom opened this issue Mar 5, 2024 · 1 comment
Open

Comments

@BillyTom
Copy link

BillyTom commented Mar 5, 2024

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
@jayanta525
Copy link
Owner

Thats indeed a good idea.

Currently, if a folder contains index.html, index.html is not generated for that folder by gh-actions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants