Add possibility to use custom workspace
Description of the Change
Add a possibility to specify workspace folder as environment variable WORKSPACE_DIR in case the Wordpress artefact files are located in custom folder. If environment variable WORKSPACE_DIR is not set GITHUB_WORKSPACE variable (and path) will be used
Alternate Designs
Tried to redefine GITHUB_WORKSPACE variable when passing it into the action, but that didn't work for me.
Benefits
The actions is more reusable in other use cases
Possible Drawbacks
Verification Process
I tested on a fork with .distignore and .gitattributes, both seemed to work fine.
Checklist:
- [x] I have read the CONTRIBUTING document.
- [x] My code follows the code style of this project.
- [x] My change requires a change to the documentation.
- [x] I have updated the documentation accordingly.
- [ ] I have added tests to cover my change.
- [ ] All new and existing tests passed.
Applicable Issues
Changelog Entry
Hi @tatsta - thanks for sending this in. Is this to address #16?
Hi! Yes, hopefully this could solve it
I have re-based this and slightly altered what was here @tatsta & @helen I'd appreciate 👀 or responses if you find time.
For me not having this is preventing me from having a release github action. I Could totally roll my own, but if #16 and this are anything to go by, the issue affects a lot of people.
Differences:
- I decided
.gitattributesand other ignore files SHOULD continue to live in the root of the repository. For me this is not about obfuscation, but rather shipping only what is needed for Runtime in WP and the plugin directory. - I decided the assets folder should also be relative to the root of the repository. This does not prevent people moving it, but it means they don't mentally need to resolve paths I hope.
Thanks to both.
@iamdharmesh bumping back up for your review.
@jeffpaul This is already handled by Tung's PR https://github.com/10up/action-wordpress-plugin-deploy/pull/83. So, we can proceed with closing this. Please feel free to reopen if I missed anything or misunderstood anything here.
Thanks