Deploying a GitHub repository
If you have a project hosted on GitHub that you want to deploy using Replit, the process is incredibly simple. Just follow these easy steps to import your repository, ensure its smooth operation, and deploy it to a public URL for hosting.
Import a Replit App from GitHub
Create a new Replit App
Navigate to https://replit.com/new or click the + button at the top right of the screen to create a new Replit App.
Import from GitHub
Click the Import from GitHub button at the top right of the modal.
Enter repository details
Enter the URL or the name of the GitHub repository you want to import. You do not need to be the repository owner.
Configure the Replit App
Configure run command
After importing, configure the run command for the Replit App. This is usually auto-filled, but you can modify it to suit your project’s requirements.
Run the Replit App
Click the Run button at the top right of the screen to ensure the Replit App can run.
Wait for installation
The Replit App will install packages and execute the run command.
Modify the Run command
If you need to change the run command:
Access hidden files
Click the Show hidden files button at the top right of the file tree and open the .replit
file.
Update run command
In the .replit
file, change the run
line to:
Test the changes
Rerun the Replit App to ensure it works as expected. Once confirmed, proceed to deploy the Replit App.
Deploying the Replit App
Initiate deployment
Click the Release button at the top right of the screen.
Select deployment option
Select the Deploy option, allowing you to deploy the Replit App to a public <app-name>.replit.app
URL (or a custom domain) for public hosting.
Choose deployment tier
Choose the Deployment tier you want to use. You can use the dropdown to select the perfect power for your Deployment machine. Learn more about the different Deployment tiers here.
Review purchase summary
Next, you will see a summary of the purchase. This includes the cost of the tier and if auto-refill is enabled. Click the Deploy your project button to continue.
Configure deployment settings
Enter the build command, run command, and any environment variables needed for production.
Deploy your project
Once you have entered the required information, click the Deploy button to initiate the Deployment process.
Monitoring a Deployment
We offer a few ways of interacting and monitoring your Deployments. You can view and change details such as custom domains, build logs, and build history. Find information on editing Deployment details here.
Troubleshooting
If you’re having trouble with your Deployment or the Deployment fails, refer to this page for steps to mitigate issues with Deployments.
Was this page helpful?