Import from GitHub
There are currently two ways to import your machines from GitHub into the Stately Studio:
Import all machines from a GitHub repository
Use Import from GitHub to import all the machines from your GitHub repository into one project in the Stately Studio.
How to import all machines from a GitHub repository into a project:
- Navigate to My Projects from the sidebar or the Stately menu.
- Use Import from GitHub to open the Import repo from GitHub modal.
- The GitHub integration will fetch all available repositories (public and private). The search bar helps you filter the available repositories.
- Choose the repository from which you wish to import machines.
- The Studio will import your machines into a new private project using the same name as your repository and open your project in the Editor.
You can rename the project from the Project settings and change the project’s visibility from the Editor’s share dialog.
Import from a specific branch
Currently, the Import from GitHub feature imports all machines from the default branch in your GitHub repository.
If you want to import machines from a different branch or from a pull request, we recommend importing each machine from a GitHub URL.
Importing a machine with Import from GitHub or importing a machine with a GitHub URL will prompt you to Allow integration to give our GitHub integration access to your GitHub repositories. You will only be prompted if you have not yet given the GitHub integration access on your current device.
Your GitHub token is stored on your own device; we don’t save the token in our database. We do this to keep your data as safe as possible, but it does require that you accept the integration on the initial import for each device you use.
Import machine from a GitHub URL
If you want to import a machine, or multiple machines, from a GitHub file, we recommend you use our feature to import from a GitHub URL.
- Open a file containing one or more machines on GitHub.
- Modify the URL in the browser’s address bar to replace the
- The Editor will then display your imported machine.
- Save the machine to enable editing and easily find your machine in your projects later.
Importing from a GitHub URL works with files in any branch in your private repositories, any public repositories, and any files in pull requests.
When your machine is hosted at GitHub:
https://github.com/username/repo/blob/main/apps/superMachine.ts, update the URL to
https://github.stately.ai/username/repo/blob/main/apps/superMachine.ts and the Studio will start the import.