Skip to Content
πŸ”§ GitHub App Creation

GitHub App Creation Guide

GitHub Apps are the preferred way to integrate Sitepins with GitHub, providing specific permissions and the ability to act on behalf of the application without using personal access tokens.

Step 1: Create the App

  1. Go to Settings > Developer settings > GitHub Apps and click New GitHub App.
  2. App Name: Choose a unique name.
  3. Homepage URL: Your application’s URL.
  4. Callback URL: http://localhost:3000/github-installed (for development).
  5. Setup URL: http://localhost:3000/github-installed.

Step 2: Permissions

Sitepins requires the following permissions to function as an editor:

Repository Permissions

  • Contents: Read & Write (to edit and save files).
  • Metadata: Read (required by all apps).
  • Administration: Read & Write (to manage branches and repository settings).
  • Deployments: Read (to track site build status).
  • Statuses: Read (to check commit checks/actions).

User Permissions

  • Email addresses: Read (for account linking).

Step 3: Authentication during Installation

Check the box: β€œRequest user authorization (OAuth) during installation”. This allows Sitepins to identify the user installing the app and link their GitHub account to their Sitepins account in one flow.

Step 4: Private Key

  1. Generate a Private Key in the app settings.
  2. Download the .pem file.
  3. Copy its content into your .env as GITHUB_APP_PRIVATE_KEY. Use a single line with \n or a multi-line string depending on your environment loader.

Step 5: Webhooks (Optional)

Webhooks can be used to receive real-time updates when files are changed outside of Sitepins. For simple editor usage, these can be disabled during initial setup.

Last updated on