Prerequisites
- A GitHub repository containing your Retype project source files
- GitHub Actions enabled on your repository (enabled by default)
Automated deployment with GitHub Actions
The recommended way to deploy to GitHub Pages is to use theretypeapp/action-build GitHub Action. This workflow automatically builds your Retype site and pushes the output to a retype branch whenever you push changes.
Add the workflow file
Create a file at Commit and push this file. The workflow will run automatically and create a
.github/workflows/retype-action.yml in your repository with the following content:.github/workflows/retype-action.yml
retype branch containing your built site.Configure GitHub Pages
Navigate to Settings > Pages in your repository. The URL follows this pattern:Under Branch, select the
retype branch from the dropdown, then click Save.The
retype branch is created by the GitHub Action after its first successful run. If you do not see it in the list, push a commit to trigger the workflow first.Enable HTTPS
After saving, check the Enforce HTTPS checkbox on the same Pages settings page. GitHub Pages provides a free TLS certificate for all
github.io subdomains.Set the url in retype.yml
GitHub Pages hosts your site under a subfolder of your For example, if your GitHub organization is This ensures all internal links and assets resolve correctly when the site is served from a subfolder.
github.io subdomain. Set the url in your retype.yml to match:retype.yml
CompanyX and your repository is docs:retype.yml
Manual deployment
If you prefer to build locally and push the output manually, you can runretype build and then force-push the output directory to a gh-pages branch:
gh-pages branch as described in Step 2 above.
Custom domain
To use a custom domain or subdomain instead ofgithub.io:
Add the custom domain in GitHub
On the Settings > Pages page, enter your domain in the Custom domain field and click Save. For example:
- Root domain:
example.com - Subdomain:
docs.example.com
Configure DNS
Update your domain’s DNS records to point to GitHub Pages. Follow the GitHub DNS configuration guide for the exact records required for your domain type.
Other hosting options
Netlify
Deploy to Netlify with automatic builds from your Git repository.
Cloudflare Pages
Host on Cloudflare Pages with global CDN and DDoS protection.
Docker
Run Retype in a Docker container for flexible self-hosted deployments.
