action-wordpress-plugin-deploy icon indicating copy to clipboard operation
action-wordpress-plugin-deploy copied to clipboard

Add possibility to use custom workspace

Open tatsta opened this issue 6 years ago • 3 comments

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

tatsta avatar Mar 10 '20 10:03 tatsta

Hi @tatsta - thanks for sending this in. Is this to address #16?

helen avatar Mar 10 '20 16:03 helen

Hi! Yes, hopefully this could solve it

tatsta avatar Mar 11 '20 07:03 tatsta

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 .gitattributes and 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.

Lewiscowles1986 avatar Oct 22 '20 16:10 Lewiscowles1986

@iamdharmesh bumping back up for your review.

jeffpaul avatar Dec 19 '22 17:12 jeffpaul

@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

iamdharmesh avatar Jan 06 '23 10:01 iamdharmesh