pushing to gh-pages

Richard Schneider's Avatar

Richard Schneider

Dec 28, 2016 @ 07:07 AM

In my CI, I create all the API documentation in a folder. I now want to push the folder to github on the gh-pages branches.

Any documentation/examples on how to do it?

cheers

  1. 1 Posted by Ilya Finkelshte... on Dec 28, 2016 @ 09:40 PM

    Ilya Finkelshteyn's Avatar

    Hi Richard,

    We don't have some specific documentation on how to do this. I made small working project based on the following sources:

    Here is working project, here how it builds, and here is published content.

    YAML content:

    version: 1.0.{build}
    environment:
      access_token:
        secure: N/ZxtHVMz9uWqVL9Sjs/65OfIzAoQdw2+WTq2EnaZVyPsPMuEO0GypqCtgN7BuFo
      github_email:
        secure: LRTp6Ub3hLqQcOZ61S59Mgw9D+Rc/bjZQW587M0u18E=
    build: off
    test: off
    deploy_script:
      - git config --global credential.helper store
      - ps: Add-Content "$env:USERPROFILE.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n"
      - git config --global user.email %github_email%
      - git config --global user.name "IlyaFinkelshteyn"
      - git subtree push --prefix ApiDocs origin gh-pages
    

    Note that I was needed to delete gh-pages once and re-run the build to avoid error described here and I did not find better approach for now.

    Thanks, hope you will find it useful :)
    Ilya.

  2. Ilya Finkelshteyn closed this discussion on Aug 25, 2018 @ 02:10 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac