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.
- Stately 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 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.
GitHub permissions​
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.
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
.com
with.stately.ai
. - 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.
Example​
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 Stately Studio will start the import.