# Using Roots 7.0 with Git deploy

**URL:** https://discourse.roots.io/t/using-roots-7-0-with-git-deploy/1871
**Category:** sage
**Created:** 2014-07-05T04:43:45Z
**Posts:** 6

## Post 1 by @KevinLisota — 2014-07-05T04:43:45Z

I’m using Roots 7.0 on a host where I Git Deploy (WPEngine). The new grunt workflow creates scripts, css and the manifest.json files, but all of those are commented out in .gitignore. Since they never make it in to my repo, they never get deployed when I push to the production servers.

I assume the solution is to just remove the relevant lines in gitignore so that these can be versioned. I understand the desirability of not having to commit these generated assets, but for those of us using a Git deployment mechanism, I don’t see any other way to make this work.

---

## Post 2 by @ajmalafif — 2014-07-06T09:42:55Z

I haven’t check out Roots 7.0 but I used Git for my WordPress deployment workflow with both Pagodabox and Bedrock on EC2. Feels like I’m missing something here with the new release, is there a change in workflow?

Normally I would just run `grunt dev` and just deploy like usual.

---

## Post 3 by @ben — 2014-07-07T00:49:16Z

> [@KevinLisota](#):
>
> I assume the solution is to just remove the relevant lines in gitignore so that these can be versioned. I understand the desirability of not having to commit these generated assets, but for those of us using a Git deployment mechanism, I don’t see any other way to make this work.

That’s seems fine since that’s how it worked before version 7 anyway

> [@ajmalafif](#):
>
> Normally I would just run grunt dev and just deploy like usual.

See: [https://github.com/roots/roots/blob/master/README.md#theme-development](https://github.com/roots/roots/blob/master/README.md#theme-development)

> `grunt build` — Create minified assets that are used on non-development environments

---

## Post 4 by @swalkinshaw — 2014-08-06T02:18:52Z

I moved 9 posts to a new topic: [Capistrano: run Grunt locally and upload files](http://discourse.roots.io/t/capistrano-run-grunt-locally-and-upload-files/2062)

---

## Post 5 by @shaimoom — 2014-08-07T21:21:42Z

I have been relentlessly practicing this new Git deploy workflow to demonstrate it at my upcoming talk at [WordCamp LAX](http://2014.la.wordcamp.org/session/developers-wearing-the-testing-hat/). This is what I have and please let me know if I am making any errors or being redundant. I am primarily a designer and front-end developer, so I am learning as I go along with a lot of these new technologies Roots has been adopting.

###Services/Software used

- Terminal
- [github.com](https://github.com/)
- [Github for Mac](https://mac.github.com/) (desktop GUI for git)
- [Sublime Text](http://www.sublimetext.com/)
- [MAMP](http://www.mamp.info/en/)
- [Deploy](https://www.deployhq.com/) (deployment from git repositories)

For the purposes of this example, I am renaming the theme as ‘demo’.

####Part I: Github setup

1. Create a repository at [github.com](http://github.com) named ‘demo’

- Clone Roots repository from [github.com](http://github.com) to desktop as ‘demo’
- Change local Roots clone settings as follows:
  - Change Primary remote repository (origin) to: [https://github.com/shaimoom/demo.git](https://github.com/shaimoom/demo.git) (from [github.com](http://github.com) repo)
  - Delete the following from Ignored files (.gitignore):
    - `assets/css/*main*.css`
    - `assets/js/*scripts*.js`
    - `assets/js/vendor/modernizr.min.js`
    - `assets/manifest.json`

- Sync the local and remote repositories (initial commit)

####Part II: Local Dev Setup, Install Dependencies & Grunt

1. Add `define('WP_ENV', 'development');` to the WordPress installation `wp-config.php`

- Right-click on the ‘demo’ repository in Github and select ‘Open in Terminal’
- Run `npm install` on theme root directory (vendor assets will be added to the theme)
- Run `grunt watch` on theme root directory in terminal to track changes
- Activate theme
- Customize theme

####Part III: Deployment

1. Remove `define('WP_ENV', 'development');` in the WordPress installation `wp-config.php`

- Run `grunt build` and commit in Github (minified assets will be generated for production)
- Add SSH & SFTP info to [Deploy](https://www.deployhq.com/) (including theme file path)
- Deploy from latest commit
- Activate theme on production site
- Win?

Repeat **Part II** and **Part III** during local development.

Your comments are appreciated.

---

## Post 6 by @shaimoom — 2014-08-08T18:24:33Z

As I am looking at this, I am seeing that there may be some unnecessary steps with grunt in my workflow. Particularly Step 1 and Step 2 in **Part III**.

How can I add the tasks executed by `grunt build` into `grunt watch`? This way, I do not have to adjust `wp-config.php` and can simply deploy after saving customizations to the theme.

---

## Post 7 by @ben — 2022-02-26T02:58:46Z


