saltext.github.utils.gh.pages

Operations on GitHub Pages sites of repositories.

saltext.github.utils.gh.pages.build_source(branch=None, path=None)[source]

Build a Pages source payload from branch and path, or None when both are unset.

branch

Repository branch to publish from.

path

Repository directory to publish from, either / or /docs.

saltext.github.utils.gh.pages.get(conn, repo_name, *, owner=None)[source]

Return information about the GitHub Pages site of a repository.

conn

GitHubConnection to use.

repo_name

Repository name.

owner

Owner of the repository. Defaults to the connection’s owner.

Raises GitHubNotFoundError if the repository has no Pages site.

saltext.github.utils.gh.pages.create(conn, repo_name, *, build_type=None, source=None, owner=None)[source]

Configure a GitHub Pages site for a repository. Returns the data of the created site.

conn

GitHubConnection to use.

repo_name

Repository name.

build_type

Process by which the site is built, either legacy (deploy from a branch) or workflow (GitHub Actions).

source

For legacy builds, the deployment source as a mapping with branch and path.

owner

Owner of the repository. Defaults to the connection’s owner.

saltext.github.utils.gh.pages.update(conn, repo_name, *, build_type=None, source=None, cname=Ellipsis, https_enforced=None, owner=None)[source]

Update the GitHub Pages site configuration of a repository.

conn

GitHubConnection to use.

repo_name

Repository name.

build_type

Process by which the site is built, either legacy (deploy from a branch) or workflow (GitHub Actions).

source

For legacy builds, the deployment source as a mapping with branch and path.

cname

Custom domain for the site. Pass None explicitly to remove it.

https_enforced

Enforce HTTPS for the site.

owner

Owner of the repository. Defaults to the connection’s owner.

saltext.github.utils.gh.pages.delete(conn, repo_name, *, owner=None)[source]

Delete the GitHub Pages site of a repository.

conn

GitHubConnection to use.

repo_name

Repository name.

owner

Owner of the repository. Defaults to the connection’s owner.