Skip to main content

Gitlab Integration

Abstract

You can upload content directly from Paligo to Gitlab. Set up the Paligo-to-Gitlab integration so that Paligo can connect to Gitlab, and then you can publish to a Gitlab project.

paligo-to-gitlab-small.png

Paligo has Continuous Integration (CI) support for Gitlab. This means you can create content in Paligo, such as a PDF or an HTML help center, and publish it to Gitlab. The content is uploaded to Gitlab as a zip file.

Note

Paligo cannot upload files that are larger than the Max Push Size limit that is set in Gitlab. You can find information on how to change the Max Push Size limit in the official Gitlab documentation.

Before you can connect Paligo to Gitlab, you need:

  • Basic Gitlab skills, including how to set up a project.

  • A Gitlab account, set up to have a personal access token (PAT). The PAT must have the api permission.

    To learn how to create a personal access key, see the official Gitlab documentation.

  • A project in your Gitlab account. The project will receive the content you publish in Paligo.

    To learn how to create a project, see the official Gitlab documentation.

You can then Connect Paligo to Gitlab and Publish to Gitlab.

Connect Paligo to Gitlab

To connect Paligo to Gitlab:

  1. Log in to Paligo via a user account that has administrator permissions.

  2. Sign in to Paligo using a user account that has administrator permissions.

  3. Select the avatar in the top-right corner. User avatar. It shows the user's image and their name. Next to the name is a downward pointing arrow, which when selected, reveals a menu.

  4. Select Settings from the menu. Cog icon.

  5. Select the Integrations tab. Jigsaw piece icon.

    Paligo settings. The Integrations tab is highlighted.
  6. Find the Gitlab box and select Add (or Change if an integration has been set up previously).

    Add_Gitlab.png
  7. Enter the Project ID.

    Gitlab integration settings in Paligo

    This is a unique identifier that Gitlab assigns to your project. You can find it on the project's page in Gitlab.

    Close-up of project details on a Gitlab project page (in Gitlab). The project ID is shown below the project name.
  8. In Gitlab, generate a personal access token (PAT) for your user account, see the official Gitlab documentation.

    Important

    When you create a personal access token, you can only see and copy the key when you first create it.

    After that, it is unavailable, so when you create it, copy and paste it into Paligo while you still have the settings open in Gitlab.

    The personal access token can be for any user account that can access the repository, but it must have the API permission.

  9. Copy and paste it into the Personal Access Token field in Paligo.

  10. Use the checkbox Self hosted GitLab domain to push content to a user provided subdomain instead of gitlab.com. Optional

    Self-hosted_gitlab_domain.png
  11. Choose the Branch that Paligo will upload content to.

    Branch options shown in dropdown list. There is an option for each branch that Paligo has detected. These branches are created for the project in Gitlab.

    If the Branch field is empty (or if a branch is missing), select the branch button to load the branches. Then choose the branch from the dropdown list.

    Branch field in the Paligo integrations settings. The branch button at the far right of the field is highlighted.

    Note

    If the integration setting is open when new branches are added, those new branches will not appear in the Branch field unless the integration setting is reloaded.

    Select the branch button, to reload the integration setting with the latest branch information.

  12. As Destination folder, you enter the directory path for the folder that you want Paligo to upload content to.

    To upload the zip file directly to the root, leave this field empty.

    Destination_Folder.png
  13. Control how Paligo names the output ZIP file with Use non-unique file name. It affects how the file is stored in the repository.

    • Check the box to use a consistent filename for the output ZIP file each time you publish. If the repository already contains a file of the same name, the new file will replace the old one.

    • Clear the box to add a number suffix to each output ZIP file when you publish. The repository will contain files for each output.

    Use non-unique file name setting. There is a checkbox and a description that explains checking the box will result in the same file name being used for each upload.
  14. Control if the provided gateway is used with Use the Paligo provided gateway when connecting to Gitlab:

    • Check the box to use the provided gateway.

    • Clear the box to not use it.

    Gitlab_provided_gateway_small.jpg
  15. Select Save.

  16. Select the Change button for the integration.

  17. Select Test Settings to run a connection test.

    Test_Reset_Settings_Integrations_small.jpg
  18. If the settings are:

    • Correct, Paligo shows a green success notification.

    • Incorrect, Paligo shows a red failure notification.

      Check each connection setting carefully, to make sure you have not made any mistakes and try again.

      If the connection test continues to fail, contact Paligo support for assistance.

When the connection is made, you can Publish to Gitlab.

Publish to Gitlab

To publish from Paligo directly to Gitlab, you need:

  • A publication or topic (ready to publish) in Paligo

  • A suitable layout for publishing, for example, an HTML5 help center layout (see Create a Layout)

  • The Paligo-to-Gitlab integration settings in place (see Connect Paligo to Gitlab).

With these in place, you can publish your content in Paligo and it will be uploaded to a Gitlab repository automatically.

  1. Select the dotted menu (...) for the topic or publication in the Content Manager.

    selectpublish.png
  2. Select Publish.

    publish-document-jan23.png

    Paligo displays the Publish document dialog.

  3. Select the Type of output you want to publish (for example PDF, HTML, HTML5, Word, XML, eLearning, SCORM, or other).

  4. Select the Layout to be used for your output.

  5. Select the languages to be published.

    Languages section of Publish document dialog. There are options for each language. English UK and Swedish are selected.

    Note

    If no translations are available, only the Source Language will show. If you have multiple languages translated and approved, you can select which ones to include. Paligo will publish each language as a separate output.

    For PDF output you can publish them as one multilingual publication, check the Combine selected languages box.

  6. If your content is set up to use Filtering / Profiling, use the Profiling attributes section to apply them. [Optional]. If you do not use filtering, ignore this setting.

    Select Edit and then choose the value for each filter that you want Paligo to use. For example, for Audience, choose Expert to include content that is marked as for expert users.

    If you do not want to apply a filter, leave the field blank.

    Profiling attributes dialog. Outputformat is set to include HTML.

    Select OK to add your chosen profiling attribute(s).

    Profiling attributes section of Publish document dialog. Shows Outputformat: HTML selected.
  7. In the Upload output section, check the Upload to Gitlab box.

    By default, Paligo will upload the output to the repository and folder that are specified in the Paligo to Gitlab integration settings.

    upload-to-gitlab.png

    You can publish to a different branch and/or folder if required. Select the Edit icon next to Upload to Gitlab, and then select the branch and/or folder in the Gitlab dialog. The settings you choose will only be used for this individual publishing process. Any future publishing will revert back to using the branch and folder that are defined in the integration settings.

    gitlab-edit-branch-directory.png
  8. Use the Output filename section to control the filename.

    By default, Paligo will use the filename syntax that is defined in the System Settings.

    Output filename section. There is a Template field that contains the values ID, Title, and Format. In the top-right corner is a preview of the filename that Paligo will generate if the current settings are used.

    To change the information included in the filename, enter your preferred format in the publishing settings. Default is: ID-Title-Format.

    You can use:

    • ID - The ID of the document.

    • Title - The title of the publication or topic that you are publishing.

    • Format - The name of the output format, for example, PDF or HTML5.

    • Edit date - The date that the publication or topic was last edited.

    • Branch label - The text from the branch label for the publication or topic. This only applies if your content has been branched and it has a branch label. For details, see Add or Edit Branch Labels.

    • Unique value - A random string of characters, generated by Paligo, that is added to the filename to make it unique. This can stop the file from being overwritten by later publishes of the same document.

    Tip

    If you type @ into the field, Paligo displays a list of the available values and you can select from the list. To remove a value, click in it and use the delete key or backspace key to remove all of its characters.

    Note

    The filename shown in the top-right corner is a preview of the filename that Paligo will use when you publish.

  9. Set the Optional Parameters (leave unchecked if you do not want these features):

    • Save the output in Paligo - Check the box to save the zip file that Paligo creates when you publish. The zip file will be available from the Resource View and you can download it from the Saved Outputs tab. Clear the box if you don't want Paligo to store the zip file.

    • Notify me - Check this box if you want Paligo to send you an email when the publication is ready. This is useful if you have very large publications that can take a longer time to process and publish.

    • Make debug build - Check this box if you want Paligo to include a log file and link report. If there is an issue with your content, Paligo support may ask you to enable this feature so that they can use the log files to investigate.

  10. Select Publish Document.

    Paligo starts processing your content and applies your layout and publishing settings. The time that this takes varies depending on how much content you are publishing (the more content, the longer it takes).

    Publish_Progress_Bar_small.jpg

    A progress bar appears. Select the arrow to hide the progress bar and reopen it by selecting the progress clock in the top menu. To abort the publish, select the X.

    The published output appears as:

    • A ZIP file with the published output appears in the downloads folder on your computer.

      If you have altered your browser's settings to store downloaded files somewhere else, the zip file will be found there instead.

      If you are using a publishing integration, the zip file will also be sent to the relevant service.

    • A link in the Activity Feed Panel to download the published content.

    Note

    To make the content available online, first unzip the file. You can then use the file locally or you can use an FTP client, such as Filezilla, to upload the unzipped content to a web server.

    Tip

    You can save your publishing settings and reuse them to achieve a smoother publishing process, see Publishing Settings. Any settings you save can also be used for Batch Publishing.

    Publish document dialog has a Save Settings option and a Saved Settings tab. The option saves the currently shown settings and these can then be selected in a single action on the tab.