Creating a gruntfile to compile Jekyll and push a subfolder to Github

69 Views Asked by At

I have a gruntfile that compiles my jekyll for me, and I want it to push the compiled folder up to my github and ignore the main folder that Gruntfile resides in. I'm doing this utilizing grunt git-deploy. I'm getting "Arguments to path.join must be strings. Use --force to continue". But everything is in a string as it's suppose to be and is documented, unless I'm missing something which is quite possible because I haven't slept in a day or so.

Here is the portion in question

git_deploy:
  your_target:
    options:
      url: '[email protected]:Diope/diope.github.io.git'
      message: 'new post'
    src: "/_site"

Any direction is greatly appreciated.

2

There are 2 best solutions below

0
On

After waking up from a long overdue siesta, I noticed the problem immediately. I had a leading "/" for my source location.

1
On

The example from grunt git-deploy is:

grunt.initConfig({
  git_deploy: {
    your_target: {
      options: {
        url: '[email protected]:example/repo.git'
      },
      src: 'directory/to/deploy'
    },
  },
})

Have you tried wrapping with braces and using the single quotes for the src?

  git_deploy: {
    your_target: {
      options: {
        url: '[email protected]:Diope/diope.github.io.git'
      },
      src: '/_site'
    },
  },