Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

deployToGhPages

import { deployToGhPages } from "https://garn.io/ts/v0.0.16/mod.ts";

A garn plugin that allows easy deployment of a package to GitHub pages.

function deployToGhPages<T>(pkg: Package | ((t: T) => Package)): Plugin<{
deployToGhPages: Executable;
}
, T>
;
§
deployToGhPages<T>(pkg: Package | ((t: T) => Package)): Plugin<{
deployToGhPages: Executable;
}
, T>
[src]

§Type Parameters

§Parameters

§
pkg: Package | ((t: T) => Package)
[src]
  • The Package whose artifacts will be committed to the gh-pages branch. For convenience, this can also be a function that takes in a reference to the project and returns the Package.

Example:

export const myProject = mkNpmProject({ ... })
.addPackage("genStaticSite", "npm run build && mv dist/* $out")
.add(garn.deployToGhPages(project => project.genStaticSite));

Then running garn run myProject.deployToGhPages will create the gh-pages branch for you if it doesn't already exist, and add a commit containing the artifacts from the specified project (genStaticSite in the example above) to the branch.

At this point all you need to do to deploy is push the branch to GitHub with git push <remote> gh-pages:gh-pages

§Return Type

§
Plugin<{
deployToGhPages: Executable;
}
, T>
[src]