Skip to main content

versite

versite is a versioned static-site deployment tool for prebuilt static site directories. It manages a deployment branch containing multiple published site versions, aliases, redirects, and per-version metadata.

Why it exists

versite focuses on deployment branch management only. It copies a prebuilt static site into a versioned path, updates versions.json, manages aliases and redirects, and commits the result to the deployment branch.

It does not:

  • build MkDocs sites
  • build Jekyll sites
  • run custom build commands
  • rewrite generated asset URLs after a site is built

Installation

pip install -e .
versite --help

Configuration

versite reads versite.yml if present. The config loader only uses lightweight YAML parsing.

remote: origin
branch: gh-pages
deploy_prefix: ""
alias_type: redirect
redirect_template: null
push: false

CLI flags override config values.

Prebuilt Site Deployment

Deploy expects a prebuilt static site directory:

versite deploy 1.0 latest --site-dir path/to/site

versite publishes the contents of --site-dir into the deployment branch under the version path, updates versions.json, manages aliases, and writes redirects when needed.

If the generated site needs a versioned base path, that must be handled during the build step before versite sees the output. versite does not rewrite generated HTML, CSS, JavaScript, or asset URLs after the fact.

Migration Examples

MkDocs:

VERSION=1.0
VERSITE_VERSION="$VERSION" MIKE_DOCS_VERSION="$VERSION" mkdocs build --clean --site-dir dist/site
versite deploy "$VERSION" latest --site-dir dist/site

Jekyll:

VERSION=1.0
bundle exec jekyll build --destination dist/site --baseurl "/$VERSION"
versite deploy "$VERSION" latest --site-dir dist/site

For Jekyll and other generators that emit root-based asset or page URLs, build with the correct base path for the versioned deployment location.

Command Reference

versite deploy VERSION [ALIAS...] --site-dir path/to/site
versite list [IDENTIFIER]
versite delete [IDENTIFIER...] [--all]
versite alias IDENTIFIER [ALIAS...]
versite retitle IDENTIFIER TITLE
versite props IDENTIFIER [PROP]
versite set-default IDENTIFIER
versite serve

Important options:

  • --config-file FILE
  • -r, --remote REMOTE
  • -b, --branch BRANCH
  • -m, --message MESSAGE
  • -p, --push
  • --allow-empty
  • --deploy-prefix PATH
  • --alias-type {redirect,copy,symlink}
  • -T, --template FILE
  • --ignore-remote-status
  • --site-dir DIR
  • --json

Alias Modes

  • redirect: writes static HTML redirects. This is the default and works well on GitHub Pages.
  • copy: copies the deployed version directory into each alias directory.
  • symlink: creates symlink aliases in the target branch for compatibility-focused setups.

GitHub Pages

versite is designed for branch-based static hosting. A common setup is gh-pages with redirect aliases and a root index.html redirect created by set-default.

Example:

branch: gh-pages
alias_type: redirect
push: false

GitHub Action

The repository includes a reusable composite action at action.yml.

Example usage:

- uses: owner/repo@main
  with:
    version: 1.0
    aliases: latest
    default-to: latest
    site-dir: dist/site
    branch: gh-pages
    push: true

The action installs versite from the checked-out repository, then runs versite deploy with the inputs you provide. It is meant for prebuilt site output, so your workflow should build the site before invoking it. Internally it uses github.action_path, so consumers do not need to check out the action repository manually. The action also configures a default git author for the deployment commit when running in GitHub Actions.

Example Jekyll workflow:

name: Site

on:
  workflow_dispatch:
    inputs:
      version:
        description: Version identifier to publish
        required: true
        type: string

permissions:
  contents: write

jobs:
  site:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: "3.3"
          bundler-cache: true

      - name: Build site
        env:
          VERSION: ${{ inputs.version }}
        run: |
          bundle exec jekyll build \
            --destination _site \
            --baseurl "/$VERSION"

      - uses: owner/repo@main
        with:
          version: ${{ inputs.version }}
          aliases: latest
          default-to: latest
          site-dir: _site
          branch: gh-pages
          push: true

Set default-to when you also want a root index.html redirect written in the deployment branch. A common pattern is default-to: latest, which makes / forward to the alias that tracks your current preferred version.

This repository also includes a reusable workflow at .github/workflows/site.yml that builds with Jekyll and deploys with versite. It computes the Jekyll baseurl from the version and optional deploy prefix before calling versite deploy.

Migration From mike

  • mike deploy roughly maps to building the site first and then running versite deploy --site-dir ....
  • mike list, delete, alias, retitle, props, and set-default roughly map to the same versite subcommands.
  • Unlike mike, versite does not run MkDocs builds.
  • Shared deployment settings should move into versite.yml.

Metadata

Release files for versite 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for versite 0.1.3
File Size Uploaded Provenance
versite-0.1.3.tar.gz 16.0 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for versite 0.1.3
File Interpreter ABI Platform
versite-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 30.4 kB

Release files / versite-0.1.3.tar.gz

Download URL versite-0.1.3.tar.gz
Size 16.0 kB
Tags Source
SHA-256 checksum
How to use checksums
884994df25c28252cce60d4d2518457ec2f51cc1cbeb301542e6fdc76a768467
BLAKE2b-256 checksum
How to use checksums
24c3bb320da44d5b47fc50f670aaaa00315af5ae5bd632edd306a6ae275398af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 24, 2026.

Transparency log

Release files / versite-0.1.3-py3-none-any.whl

Download URL versite-0.1.3-py3-none-any.whl
Size 14.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0ed71f539f5d51b1a2991f5cf301759180a969a87bfd23a9f2ce971f02df0b05
BLAKE2b-256 checksum
How to use checksums
2174122c4860a5215b35ddf84bd7bb8690a1c987ee6d1375883868bf5dac30d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 24, 2026.

Transparency log

Security for versite 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for versite-0.1.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page