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

[Consumer] Debug deploy-to-gh-pages #77

Open
AnthonyAstige opened this issue Jun 7, 2016 · 1 comment
Open

[Consumer] Debug deploy-to-gh-pages #77

AnthonyAstige opened this issue Jun 7, 2016 · 1 comment
Assignees
Milestone

Comments

@AnthonyAstige
Copy link
Member

Per PM with Levi & Anthony (Levi ran into issue running script), to do at a meeting in person.

Not urgent for MVP as I can push changes. However it would be nice to have a backup person to push and to give Levi control here as he's handling most of the front end coding.

@AnthonyAstige AnthonyAstige added this to the v1.1 milestone Jul 1, 2016
@AnthonyAstige
Copy link
Member Author

AnthonyAstige commented Jul 1, 2016

Related slack conversation

Levi's message Jun 30th

I think I found a better git workflow for managing gh-pages.
for reference see

git checkout master
rm -rf consumer-ui
git subtree add --prefix=consumer-ui https://github.com/codeforeauclaire/foodtrucks.git gh-pages --squash
git subtree pull --prefix=consumer-ui https://github.com/codeforeauclaire/foodtrucks.git gh-pages

make changes and commit on master
git push origin master
git subtree push --prefix=consumer-ui https://github.com/codeforeauclaire/foodtrucks.git gh-pages

I haven’t pushed to the remote yet. Hesitant as I’m not sure I would be able to fix whatever breaks. What do you think?

Anthony's response Jun 30th

I haven't used subtrees. My gut feeling peaking at the links above and googling a little, is that subtrees would likely be a superior workflow for production-managers at the cost of complexity for every developer. I'd like to avoid that complexity if possible. That said the deploy-to-gh-pages script could use some attention so I've put related issues in what I'll call our next target milestone v0.2 @ https://github.com/codeforeauclaire/foodtrucks/milestones/v0.2

Levi July 1st

I disagree. Too me, this seems less complex. I made a repo to try out this flow.

git clone https://github.com/levifelling/ghp-test.git
... mod & commit ....
git push origin master
git subtree push --prefix=public https://github.com/levifelling/ghp-test.git gh-pages
 GitHub
levifelling/ghp-test
ghp-test - test gh-pages git workflow 

view resulting gh-pages at https://levifelling.github.io/ghp-test/

so only new command needed is `git subtree push --prefix=public https://github.com/levifelling/ghp-test.git gh-pages` which if we wanted to could be put in a deploy script, or just referenced in the readme

Anthony July 1st

If we use subtrees, can someone commit to the consumer-ui folder in the master branch without ever knowing of or typing subtree?

Levi July 1st

yes

the subtree is created once, and then it just comes along with the cloned repo

so looks jsut like it is the ~/consumer-ui dir

Anthony July 1st

And we would get a different commit history in each folder, right?

Levi July 1st

checkout https://github.com/levifelling/ghp-test
GitHub
levifelling/ghp-test
ghp-test - test gh-pages git workflow

in that repo public is a subtree from gh-pages branch

Anthony July 1st

I made a test repo following the instructions from yours, and I agree now the workflow feels nice / I think would make for a simpler less brittle deploy script. Even though it works when briefly tested, I'm still foggy on what git subtrees exactly are - I'm reading up on https://github.com/git/git/blob/master/contrib/subtree/git-subtree.txt & https://developer.atlassian.com/blog/2015/05/the-power-of-git-subtree/. There may be some issues with rebasing - https://stackoverflow.com/questions/12858199/how-to-rebase-after-git-subtree-add, though I'm not sure how it'll effect us (Lowell uses rebasing I think, I don't do it much). If we want to go at using subtrees for the foodtrucks project as a learning experience it sounds good to me; feel free to drive it forward if you like and I'll note it for myself later as well.

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