Skip to content

Deployment

TSkeleton publishes three things: the npm package, the documentation site on GitHub Pages, and a Docker image on GitHub Container Registry.

Table of Contents

npm package

Prerequisites

  • An npm account logged in locally (npm login).
  • Write access to the tskeleton package name on the npm registry.
  • The package must not yet exist on the registry — this project has not been published. TODO: confirm the name is available before the first publish.

Publish to npm

npm publish

Before publishing, the prepublishOnly script runs automatically and executes typecheck, build and smoke. If any check fails, the publish is aborted.

To validate the publish without uploading anything:

npm publish --dry-run

Versioning

The current version is 0.2.0, declared in two places that must stay in sync:

Bump both files when releasing a new version. The container image also reads .version for its org.opencontainers.image.version label.

CDN distribution

Because package.json declares unpkg and jsdelivr, published versions are served automatically:

  • Unpkg: https://unpkg.com/tskeleton@0.2.0/dist/tskeleton.umd.cjs
  • jsDelivr: https://cdn.jsdelivr.net/npm/tskeleton@0.2.0/dist/tskeleton.umd.cjs
  • Stylesheet: https://unpkg.com/tskeleton@0.2.0/dist/tskeleton.css

TODO: verify these URLs after the first publish.

Package contents

The files field in package.json limits the published tarball to dist/ plus the auto-included README.md, LICENSE and package.json. Source, tests, demo and scripts are not published.

GitHub Pages documentation

The documentation site is built from docs/ with MkDocs and deployed to GitHub Pages by the Docs workflow. It runs on every push to main that touches documentation files and supports manual runs via workflow_dispatch.

Docker image

The Publish container workflow builds a multi-stage Docker image of the demo playground (static site served by nginx) and publishes it to GitHub Container Registry:

  • Image: ghcr.io/rkriad585/tskeleton
  • Tags: latest (default branch), semantic version (on v* tags), commit SHA
  • Triggers: pushes to main, v* tags, and workflow_dispatch
  • Build command: npm ci + npm run build:demo (see Dockerfile)

Back to README