peaceiris / actions-gh-pages

GitHub Actions for GitHub Pages 🚀 Deploy static files and publish your site easily. Static-Site-Generators-friendly.
https://github.com/marketplace/actions/github-pages-action
MIT License
4.55k stars 364 forks source link

proposal: keep_ files can be a string type, filtering files through wildcards. #1018

Open tidys opened 9 months ago

tidys commented 9 months ago

Checklist

Describe your proposal

I feel like keeping Files can be a string type, like excude Like assets, filtering files through wildcards.

Describe the solution you'd like

Simply put, my requirement is not to delete certain files in Warehouse B during synchronization, such as github action, readme.md, and so on.

Describe alternatives you've considered

Currently, I have executed two actions

This can achieve my goal twice, but it doesn't feel very good

Additional context

I want to synchronize a directory from warehouse A to warehouse B,

But I have my own github action in Warehouse B, and I don't want the github action file in Warehouse B to be deleted

So I used keep_ Files option.

But the file I synchronized to Warehouse B is a website, and the JS and CSS file names have hashes,

For example, index.hash.js,

If I use keep_ Files

This will cause a lot of index. hash.js files to appear in the files synchronized with Warehouse B,

Actually, all you need is an index. has.js.

Later on, I discovered that exclude_ Assets, after reading the relevant code, I found that deleting the relevant files after synchronizing them to warehouse B does not meet my needs.