Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with setting up Stag #9

Closed
alehandrof opened this issue Feb 21, 2015 · 5 comments
Closed

Help with setting up Stag #9

alehandrof opened this issue Feb 21, 2015 · 5 comments
Assignees

Comments

@alehandrof
Copy link

I'm sure I'm doing something silly, but I can't get Stag to work.

Here's my the server part of stag.yaml:

servers:
  staging:
    host: xyz.org
    webroot: /xyz
    user: xyz
    strategy: rsync

    deploy:
      pull_content_before: true
      clear_cache_after: true
      set_permissions_after: true
      ignore_files:
        - .git
        - _cache
        - _logs

    pull_content:
      content_directories:
        - _content
        - assets

And here's the error I get when trying to deploy:

alex@tosh:~/xyz/statamic$ stag deploy staging

Checking configuration:

PHP Warning:  array_key_exists() expects parameter 2 to be array, string given in /home/alex/xyz/statamic/_add-ons/stag/commands/command.deploy.php on line 102
No configuration for environment: staging. Please check your settings and
try again.

Ideas?

@nobodyiscertain
Copy link
Member

Hmmm... That looks good. I even copied in your config, and it tried to deploy.

Make sure there's not another servers: key in there that is overwriting your config, as stag isn't able to read the config you have listed above for some reason.

If you want to copy in your full config here, I'm happy to take a look.

@nobodyiscertain nobodyiscertain self-assigned this Feb 23, 2015
@alehandrof
Copy link
Author

I'll have to take a raincheck. For the moment, I've cobbled together something in Grunt that works adequately. For the record how does Stag handle merge conflicts when deploying with git? I.e., if what happens if I've edited the same file on the live server and on my development machine?

@alehandrof
Copy link
Author

Also, thanks for looking into this... I forget my manners sometimes :)

@nobodyiscertain
Copy link
Member

Yeah no problemo. I'll close this issue and just re-open if need be.

Stag doesn't handle merge conflicts. If a merge conflict happens that git can't resolve itself, you'll need to manually SSH in and fix whatever needs fixing. This has really only been an issue for us with content. Usually, once a site goes live, we don't edit any content in any other environment except production, and this keeps the conflicts to a minimum.

@alehandrof
Copy link
Author

Cool.

I'm planning to be editing content both locally and on the production server and, if I'm feeling exceptionally self-flagellating, on the staging server, as well. Sigh.

So it's possible that Stag wouldn't have been a good fit; though maybe the issue is with my workflow :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants