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
- Go to Settings > Developer settings > GitHub Apps and click New GitHub App.
- App Name: Choose a unique name.
- Homepage URL: Your applicationβs URL.
- Callback URL:
http://localhost:3000/github-installed(for development). - 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
- Generate a Private Key in the app settings.
- Download the
.pemfile. - Copy its content into your
.envasGITHUB_APP_PRIVATE_KEY. Use a single line with\nor 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