Open
Description
A lot of plugins now build into production-ready versions and are not necessarily executable in their development repo state. The next logical step (or rather, the step that should precede deploying to .org) is to run said build. IMO the built version should be committed to an orphaned stable
branch so that a trackable copy of that is also available over time but is not hanging out as a subfolder.
My thought is to do the following for this Action:
- Check out / create
stable
in another directory (I’ve done this using Git’sworktree
functionality but I don’t think it’s actually necessary to do this in the context of an Action) - Run the build process, perhaps standardizing on
npm run build
but allowing the command to be customized. For instance, in another plugin I usenpm run release
when I want to build into another directory and remove all unnecessary files, whereasbuild
builds files into the current directory and those built files are typically.gitignore
-d. - If the build process doesn’t directly build into the
stable
directory, empty the directory and then copy everything there. - Commit everything to
stable
and push.
So then the way this would work in terms of a workflow would be that on pushing a tag to master
, the build Action runs and then the Deploy one, which would then need to point to the directory stable
is in to deploy from as opposed to the default repository workspace.
Metadata
Metadata
Assignees
Labels
No labels