Publish to Heroku
Easily publish your documentation using Heroku by just uploading the raw project and letting Retype build for you!
With the dedicated Retype Buildpack for Heroku, any retype project can be published to Heroku in just a few steps!
This guide will use the Heroku CLI to go through four simple steps to publish this very website to a freshly created Heroku App.
Step 1: Clone this website's repository
To clone this website on your end using the git commandline client, issue the following command:
git clone https://github.com/retypeapp/retype
It will then create a retype directory containing a copy of this website.
Switch to the repository folder
This is important for Heroku to be able to set up the repository remotes in the next step.
Step 2: Create the app
Run the following in your command prompt:
heroku create my-app-name
Remember to replace
my-app-name with the app name of your preference. The name of the app is prefixed to the public app address. With the code above it would be:
Log in to Heroku
If you are not logged already, you can log in to Heroku with the CLI by issuing the
heroku login command.
Step 3: Enable Retype Buildpack
heroku buildpacks:set https://github.com/retypeapp/heroku-buildpack
This will do the actual magic: With this, once the documentation project is pushed to Heroku, our dedicated buildpack will kick in and handle the documentation build!
Step 4: Publish the project
Now, simply push the repository to heroku using the git command:
git push heroku main
git push process should take a few seconds to complete. Once it is done, the last lines of output should show the full URL to your app. With the app name used in this guide, it would be https://my-app-name.herokuapp.com/.
The project is built remotely
You don't need to build your documentation project with Retype beforehand other than for testing it. You also don't need to commit any built files. The Heroku Buildpack will handle all that for you!
Your project is safe
The Retype Buildpack will use your project data to build the documentation, and will keep only the built output from Retype; this means that anything that is not deployed to Retype's output won't be accessible in the published website.
Publishing your own project
Any documentation project set up to be built with retype can be replaced in
- a retype.yml file at the root of the repository
- a retype.yml file anywhere in the repository
- the full path to a directory containing retype.yml, specified via the Heroku config var
- the full path to the file. The specified file will then be used as retype.yml regardless of its name; also specified via Heroku config var](https://devcenter.heroku.com/articles/config-vars)
If there's no retype.yml file in the repository, just run
retype watch and adjust the settings to your liking in the just-created retype.yml, then commit it. Your project would then be ready to be pushed to Heroku.
Several retype.yml files in the repo
If there are various retype.yml files across the repository, we can't guarantee which one the buildpack is going to pick, and it is a good idea to use the
RETYPE_CONFIG config var to indicate where the intended configuration file is to be found within the repo.
- Grab a local copy of Retype's Website, see
- Create the Heroku App, see
- Instruct the app to use Retype's Buildpack, see
- Publish (by pushing the repo to Heroku), see
- Install Retype to build locally, see Getting Started.
- Details on
retype watch, see Quick Start.
- Accepted configuration settings in retype.yml, see Configuration > Project.
- Troubleshoot Heroku push/build issues, see Retype Buildpack's README Troubleshooting section.
- More information on Retype Buildpack, see README in Retype Buildpack's repo.
- Create account in Heroku, see Heroku website.
- Download the Heroku CLI, see Heroku CLI
- Heroku CLI documentation, see Command Line Article in Heroku dev center