Before you get started, we recommend installing Node Version Manager to help manage node
and npm
versions. Next, from your local copy of the action run nvm use
and npm install
. You're ready to start coding!
We use the feature branch workflow. The workflow for a typical code change looks like this:
- Create a new branch for the feature.
- Make changes to the code.
- Use
npx changeset
to create a changeset describing the change to users. - Commit your changes.
- Open a pull request to the
main
branch. - Once all checks are passing and the PR is approved, Squash and Merge into the
main
branch.
We use Changesets to automate versioning and releasing. When you are ready to release, the first step is to create the new version.
- Go to pull requests and view the "Version Action" PR.
- Review the PR:
- Changelog entries were created.
- Version number in package.json was bumped.
- All
.changeset/*.md
files were removed.
- Approve, then "Squash and merge" the PR into
main
.
Merging the versioning PR will run a workflow that creates or updates all necessary tags. It will also create a new release in GitHub.
The Dockerfile
is hosted as a Docker image on DockerHub: wpengine/sitedeploy.
The Docker image is used in both wpengine/github-action-wpe-site-deploy GitHub Action and the azunigawpe/wpe-bb-deploy BitBucket Pipeline. Any customizations to the image should consider the effect on both services.
Any other customizations that are uniquely required can be added to the Dockerfile in the project itself.
The latest
Docker Image will be updated automatically after merging into the main
branch.
wpengine/site-deploy:latest
A versioned Docker Image will be automatically generated for each release of this repository, based on the tag name
wpengine/site-deploy:{tagName}
Additional Docker Images will be automatically generated for each branch to use in testing.
wpengine/site-deploy:branch-{branchName}
You can also build and version this image using make targets when necessary.
make build # Builds the image locally
make version # Builds the image and creates version tags
make list-images # Shows all tagged versions of the image
make clean # Deletes all tagged versions of the image
To push a custom version of the image to DockerHub:
docker push wpengine/site-deploy:{tagName}