anchor.diff:  .Deploy using Jenkins
   image::deploy_with_jenkins.svg[]
   
  -==== Sequence for generating documents
  +The components needed on the server are:
   
  -The following image shows how the sequence from user commit to generated documents.
  +Master Repo::
  +The common (bare) git repo used by all content writers to push updates to. This repo needs to be setup with a server-side hook (_post-receive_) that are executed by git after each push to the repository.
   
  -.Sequence diagram for generating docs from adoc
  -image::Render Documents.png[]
  +Jenkins instance::
  +A running instance of Jenkins and one or more defined build jobs that use giblish to build the HTML documents.
   
  +Web Server::
  +Apache, Ngnix or other web server that provides clients with HTML pages located somewhere on the file system on the server (eg under /var/www/... )
  +
  +==== Considerations
  +
  +Possible advantages::
  + * Using Jenkins enables a lot of flexibility and scaleability. You can setup multiple jenkins agents to increase performance, you can define many build jobs where each job builds either a particular branch from a particular git repo or many branches from one or many repos.
  +
  +Possible drawbacks::
  + * You need to be familiar with, and maintain, the Jenkins instance.
  +
  +[[setup_instructions]]
   == Setup instructions
   
   Follow the instructions below to get this running on your server.
  +
  +=== Some preliminary notes
  +
  +Permissions and security::
  +These instructions does not give any advice on setting up permissions in a way that is suitable for your use case. You should however, give this an appropriate amount of consideration. You need to set the permissions so that the relevant tools and scripts can perform their expected tasks without constituting security vulnerabilities on your server. You might want to consider setting up specific user accounts/groups to achieve this but this is outside the scope of this text.
  +
  +Server side git hooks::
  +git supports several hooks that are executed at different points in the sequence of committing and pushing changes to a repository. This feature is used in both scenarios below to provide the trigger for generating the HTML document. For details on git hooks see https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks[this doc].
   
   [[common_setup]]
   === Initial setup
  
positive.code:  . provide a script that uses giblish to publish the adoc files in the working tree as HTML files that reside at a place in the file system where the web server can access them.
  
  Web Server::
  Apache, Ngnix or other web server that provides clients with HTML pages located somewhere on the file system on the server (typically under /var/www/... )
  
  ==== Considerations when choosing this scenario
  
  Possible advantages::
   * it has few dependencies on external tools, only git, giblish and a web server are needed for this to work.
  
negative.code: 
  To describe how to use giblish as a tool for creating a static web site with documents that are automatically generated each time a contributer push changes to a git repo.
  
  If you want to dive straight in and setup one of the scenarios below, jump to <<setup_instructions>>, otherwise read on for some examples and considerations.
  
  === Example usages
  
  TBD
  
  == Two deployment scenarios
  
  