Skip to content

Instantly share code, notes, and snippets.

@matdave
Last active September 1, 2022 21:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matdave/b2ca0fb940ad285793ce05c57b227768 to your computer and use it in GitHub Desktop.
Save matdave/b2ca0fb940ad285793ce05c57b227768 to your computer and use it in GitHub Desktop.
Hooking up a staging environment to gitify

Hooking up a staging environment to a Gitify Project

Install Gitify

Use composer to install Gitify on your environment

composer global require modmore/gitify:^2

Install a clean MODX environment

You can either manually install MODX or use gitifies built in command gitify modx:install. The primary thing to watch for is that it is the same version as your source environment.

Hook up Git

In the root of your MODX environment, initialize git and hook it up to your source project repo.

git init
git remote add origin git@github.com/some/project.git
git pull origin

Install Packages

First install packages to avoid errors.

gitify package:install --all

I found that some packages errored during this and required me to log in to the MODX site and manually install them.

Build the Site

Now you can build the site from gitify.

gitify build -f

The first time you build, you will want to include the -f but subsequent builds should not require this.

Helpful Commands

Extracting changes

When you want to push changes up to the repo, you will need to Extract them from the site, commit the changes and push them up.

gitify extract
git add .
git commit -m "some message about the changes"
git push

Building changes

When you want to pull these changes down, you will pull from the repo and Build them into the site.

git pull
git build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment