-
Notifications
You must be signed in to change notification settings - Fork 98
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
Deploying plugin with files that are not in git #17
Comments
@joppuyo please share your build process and whether you’re using |
Hey, here's the workflow I tried to use: https://github.com/joppuyo/acf-image-aspect-ratio-crop/blob/v3.1.4/.github/workflows/main.yml Here's the build log It generates right output into the artifact (top right corner), github releases and into my packagist release repo However, the w.org deployment is missing all the distribution files (note the removal of trunk/assets/dist and trunk/vendor, they are also missing from the tagged release) |
I was initially doing something similar like here by copying the release in its own directory but I changed the deployment to operate in the same directory because I read that a subdirectory is not supported by this action. |
What do you mean by build code? The github actions workflow file lists all the commands I run: https://github.com/joppuyo/acf-image-aspect-ratio-crop/blob/v3.1.4/.github/workflows/main.yml . I'm using gitignore to keep files like I run The idea behind deleting I think the main problem is that I don't keep the build files like js, css and composer dependencies in the repo and they are created during the github actions build process. |
Both Looking at your overall build, I would probably recommend the following:
|
Hey, thanks for looking over the repo, apologies it's a bit of a mess since this is the first time I'm trying out github actions. the Insert Special Characters plugin has pretty much the same deployment process I'm looking for. I still don't totally understand what causes the dist files to disappear with my plugin and not the one you linked? Maybe modifying the git repo with rm causes this issue? I'll look into the .distignore since it seems to better achieve the same thing. Thanks again! |
I moved the wp.org deploy action right after the npm and composer build step and now the deployment is working perfectly. I think modifying files in the git repo was the cause of my problems. I'll have to refector the workflow later but this action is already definitely better than my old shell script contraption for deploying plugins to w.org. Thanks! |
@joppuyo No problem! I think I need to write out more detailed instructions and maybe a technical explanation since most WP plugin devs are just getting into using Actions and probably don't write a lot of Bash day-to-day. The reason why your previous process was leaving out those files was because without a One thing that I want to do for #4 is add an example workflow that generates a ZIP file and attaches it to the GitHub release for your tag, so if you don't get there first hopefully I will soon :) |
Hey, I'm trying to deploy a plugin with a build process with composer install, npm install and webpack. When I tried deploying the plugin to w.org, it first failed because I didn't have a .git directory (I removed it during the build process).
I think this action is somehow tied to the git tag.
After I added the .git folder back, the deployment was successful but it deleted all my build files from the SVN repo, such as composer dependencies, javascript and css files. Needless to say this rendered the plugin non-functional.
I think the action is somehow tied to how git tracks the files, because my build files were not under git and they were removed.
The documentation here talks a lot about excluding files but not including them. Is it possible to use this action to deploy files that are not in the git repository?
Thanks!
The text was updated successfully, but these errors were encountered: