Skip to content

Gitea Webhook Setup

Connect your Gitea (or Forgejo) repository to Nebion for automatic deployments.

Before You Start

  • Created a project in Nebion (how?)
  • Admin access to your Gitea repository
  • Webhook URL, secret, and deploy key from your Nebion project page (under Setup)
  1. Add Deploy Key

    In Nebion, copy the Deploy Key from your project page. In Gitea, go to Settings > Deploy Keys > Add Deploy Key. Set title to Nebion Deploy Key, paste the public key, leave Enable Write Access unchecked, and click Add Key.

  2. Create Webhook

    In Gitea, go to Settings > Webhooks > Add Webhook > Gitea. Fill in:

    FieldValue
    Target URLPaste the Webhook URL from Nebion
    HTTP MethodPOST
    Content typeapplication/json
    SecretPaste the Webhook Secret from Nebion

    Under Trigger On, select Custom Events, then check only Pull Request. Make sure Active is checked and click Add Webhook.

  3. Test It

    Create a test branch and pull request:

    bash
    git checkout -b test-nebion
    echo "test" >> README.md
    git add . && git commit -m "Test Nebion webhook"
    git push origin test-nebion

    Create a pull request in Gitea for this branch. In Nebion, check your project page — a new pr-{number} environment should appear. Once the deployment status shows SUCCESS, click the environment URL to verify.

WARNING

Keep the webhook secret secure. Do not commit it to your repository.

Forgejo

Forgejo uses the same webhook format as Gitea. Follow the same steps above — Nebion handles both providers identically.

If the environment doesn't appear, check the webhook delivery history in Gitea under Settings > Webhooks > click your webhook > Recent Deliveries.