nielsenramon / chalk

Chalk is a high quality, completely customizable, performant and 100% free Jekyll blog theme.
http://chalk.nielsenramon.com
MIT License
1.22k stars 441 forks source link

How to deploy #142

Closed dongqui closed 6 years ago

dongqui commented 6 years ago

Hello,

I just started studying programming and I want to keep recording my study contents on wonderful blog like Chalk. Even I'm not sure if it's proper to leave a basic question here. If I'm bothering you, I'm so sorry.. but I need help.

As your description, I pushed gh-pages with publish command. The problem is I don't know what to do next.

It seems like your github pages getting resource from master brunch because I saw your updated a post in master branch. In my case, when I merge gh-pages to master, the files in master branch get deleted and can't update blog anymore even though it's deployed. Shortly,

  1. What branch should be resource for Githubpage? (is it necessary to buy domain for Chalk?) 2.What should I do with gh-pages branch?

Thank you !

nielsenramon commented 6 years ago

@dongqui You don't need to buy a domain to use Chalk if you use xxx.github.io repo name. You will need to use a different branch than master to push you jekyll files to. Then you need to change the bin/deploy contents and replace gh-pages branch to master.

That should do the trick :)

dongqui commented 6 years ago

Wow, I really appreciate it!! Thanks to you, It works actually, but I just would like to check it again. So, after I push updated files to working branch, I'm supposed to do 'bin/deploy' every time I post something and replace gh-pages to master. right??

nielsenramon commented 6 years ago

@dongqui Well you need to push your changes to the working branch first and then run bin/deploy. So there is no need to do anything else.

dongqui commented 6 years ago

oh.. I’m so sorry. It’s the last try. If it doesn’t work, probably I need to study git and Jekyll first by myself. What I did is

  1. Fork(or download) Chalk and rename it to dongqui.github.io
  2. Clone it to local
  3. Sudo npm run setup
  4. Git checkout -b working
  5. Git add .
  6. Git commit -m ‘’
  7. Git push
  8. Sudo npm run publish Then….got this message Your site is having problems building: Page build failed. For more information, see https://help.github.com/articles/troubleshooting-github-pages-builds/. (I can’t find out specific error)
nielsenramon commented 6 years ago

@dongqui Did you change the bin/deploy script so the branch gh-pages is changed to master?

dongqui commented 6 years ago

Do you mean these parts? Checkout gh-pages branch. if [ git branch | grep gh-master ] then git branch -D master fi git checkout -b master

Push to gh-pages. git add -fA git commit --allow-empty -m "$(git log -1 --pretty=%B) [ci skip]" git push -f -q origin master

Actually, I feel I'm doing wrong.. in the way above, I have to run deploy script every times .

nielsenramon commented 6 years ago

All gh-pages references should be renamed to master

dongqui commented 6 years ago

Thank you a lot! I really appreciate it!!