APIToGoAPIToGo
Visit APIToGo on LinkedIn
  • Documentation
  • Components
  • Themes
Quickstart
Configuration
Writing
Concepts
OpenAPI
Authentication
Integrations
Guides
Deployment
    APIToGoCloudflare PagesGitHub PagesVercelUpload/FTP
Extending
powered by apitogo
Deployment

GitHub Pages

GitHub Pages is a great way to publish your documentation, especially if you are using GitHub for source control.

Prerequisites

To publish your site to GitHub Pages you will need:

  • A GitHub account

Deploying to GitHub Pages

Use the GitHub Actions Workflow.

You might need to configure the basePath in your apitogo.config.ts depending on how your site is hosted. For instance, if your site is available at username.github.io/your-repo/ you would set the basePath to /your-repo.

Code
import type { ApitogoConfig } from "@lukoweb/apitogo"; const config: ApitogoConfig = { basePath: "/your-repo", //... };

Accurate Last Modified Dates

If you have enabled the showLastModified option, APIToGo automatically tracks the last modified date of your documentation pages using Git history. However, GitHub Actions performs shallow clones by default, which can result in inaccurate "Last Modified" dates for pages that haven't been updated recently.

To ensure accurate last modified dates, configure the actions/checkout step to fetch the full history:

Code
- uses: actions/checkout@v4 with: fetch-depth: 0 # Fetch all history for all branches and tags

For more details, see the actions/checkout documentation.

Last modified on March 31, 2026
Cloudflare PagesVercel
On this page
  • Prerequisites
  • Deploying to GitHub Pages
  • Accurate Last Modified Dates
TypeScript
YAML