Zum Hauptinhalt springen

Deployment

This page explains how deployment works for docusaurus subpages (like this one itself with project slug /meta/).

Deployment is triggered via GitLab webhooks when one of the following CI stages are entered:

  • upload:preview -> deployment to preview.docs.fitko.dev/<PROJECT_SLUG>/<MERGE_REQUEST_ID>/
  • stop:preview -> preview deployment is deleted again
  • upload:production -> deployment to docs.fitko.de/<PROJECT_SLUG>/

When configuring a new docusaurus instance for deployment, your Gitlab repo needs to be configured properly and your project needs to be registered in the deployment webserver. Please contact FITKO for registering any new projects.

Configure your Gitlab project

  1. Use .gitlab-ci.yml from the template repo as your CI template.
  2. The deployment assumes there is a 'build/' folder in the build jobs artifact. Make sure not to modify the .gitlab-ci.yml template here.
  3. Configure a webhook in your project or group:
    1. Go to Settings -> Webhooks
    2. Use https://docs.fitko.de/hooks/deploy as the webhook url
    3. Ask for a webhook secret and use it as the secret token
    4. Check Job events as trigger
    5. Click Add webhook

Register your repository at docs.fitko.de (webserver)

To register your project, we only need the following info:

  1. Your gitlab project id
  2. Your prefered <PROJECT_SLUG>

Behind the scenes

We use adnanh/webhook for running webhooks.