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

Add script to update docs on knora.org #300

Merged
merged 4 commits into from
Nov 7, 2016
Merged

Conversation

benjamingeer
Copy link

This adds a script that you can run manually to update the documentation on knora.org when the RST or generated API docs have changed.

The script assumes that you're on the develop branch and have already committed any changes you made there. It builds the docs and updates the gh-pages branch with the resulting HTML.

In the future we could automate this to run every time develop is updated.

@benjamingeer benjamingeer added the enhancement improve existing code or new feature label Oct 31, 2016
@benjamingeer benjamingeer added this to the Beta Release milestone Oct 31, 2016
@benjamingeer benjamingeer changed the title Wip/gh pages rst Add script to update docs on knora.org Oct 31, 2016
@tobiasschweizer
Copy link
Contributor

tobiasschweizer commented Nov 7, 2016

If I understand correctly, the branch gh-pages contains the built docs as if they were conventional files under version control.

Your script builds the docs, switches the local branch to gh-pages, takes the current docs as the new version and pushes everything to gh-pages.

I assume that github pages is configured in a way that it pulls automatically whenever a new commit is pushed.

Ok, I understood that www.knora.org points to the current version of gh-pages branch :-)

set -e

# Build the HTML docs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a check that the current branch is develop:

branch=`git rev-parse --abbrev-ref HEAD`

http://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch

# Switch to the gh-pages branch and remove the existing HTML docs from it.

git checkout gh-pages
rm -rf ../documentation/manual
Copy link
Contributor

@tobiasschweizer tobiasschweizer Nov 7, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are just deleting all the files. However, they remain under version control appearing as missing in git. I think you should use git rm. Imagine the case that someone removes a file from the docs. It will appear as missing in gh-pages although it is no longer under version control in the docs folder.

@benjamingeer benjamingeer merged commit 2395007 into develop Nov 7, 2016
@benjamingeer benjamingeer deleted the wip/gh-pages-rst branch November 11, 2016 09:14
SepidehAlassi added a commit that referenced this pull request Dec 13, 2016
* develop:
  Improve configuration for more concurrent requests (#338)
  Upgrade to Scala 2.12 (#343)
  Fix various inconsistencies in knora-base.ttl and docs. (#330)
  Fix language switching and login/logout in SALSAH (#331)
  Graph data API operation (#267)
  Allow connections over HTTPS (#332)
  Update README.md
  Add link to GraphDB.
  fix (salsah): Add missing JavaScript “var”.
  fix (webapi): Fix RouteUtilV1 so it returns HTML instead of JSON when requested (#326)
  Ontology and documentation fixes. (#325)
  fix (salsah): Create multiple links in a resource, and other bug fixes (#315)
  feature (webapi): Make TransformData fix “test” labels on regions. (#311)
  Fixes for subclasses and subproperties (#303)
  Add script to update docs on knora.org (#300)
  docs: Make trivial change for testing purposes.
  fix (webapi): CORS problems (#307)
  Use inference to optimise searches on GraphDB (#301)
@benjamingeer benjamingeer mentioned this pull request Jul 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement improve existing code or new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants