Connecting a repository
1
Navigate to Git settings
Go to your site’s Settings > Git Integration.
2
Choose your provider
Select GitHub or GitLab and authorize GoodCraft Script to access your repositories.
3
Select a repository
Choose an existing repository or create a new one. You can also specify a subdirectory within the repository.
4
Configure sync settings
Choose your sync mode and branch settings.
Sync modes
- Push to Git
- Pull from Git
- Bidirectional
Changes you make in the GoodCraft Script editor are pushed to your Git repository.
- Scripts are saved as files (e.g.,
scripts/nav-animations.js) - Each save creates a commit
- Commit messages include the script name and change summary
Repository structure
When synced, your repository contains:gcscript.config.json file stores script metadata:
Webhooks
For pull-based sync, GoodCraft Script creates a webhook in your repository. When you push changes, the webhook triggers an import.Supported events
- Push to configured branch
- Pull request merge
Webhook security
Webhooks are secured with a unique secret token. Each payload is verified before processing.Best practices
- Use branches - Work on a development branch and merge to main when ready
- Write commit messages - GoodCraft Script auto-generates messages, but you can customize them
- Review before merge - Use pull requests to review script changes before they go live