ntd2d_action.repository

Interface to a git/GitHub repositories.

Classes

class ntd2d_action.repository.Repository(server_url, repository, branch, default_branch, docs, pages_url)

Bases: object

Interface to a git/GitHub repository.

Parameters:
  • server_url (url) – The URL of the GitHub server (GITHUB_SERVER_URL).

  • repository (str) – The owner and repository name (GITHUB_REPOSITORY).

  • branch (str) – The branch linked to your documentation server (pages-branch).

  • default-branch (str) – The default branch configured in GitHub (default-branch).

  • docs (SphinxDocs) – The documentation being built.

  • pages_url (url) – URL of the web server for served documentation (pages-url).

update_pages(branch, sha)

Commit built documentation to pages-branch.

Parameters:
  • branch (str) – The sanitized (‘/’ removed) short ref name of the branch or tag that triggered the workflow (GITHUB_REF_NAME).

  • sha (str) – The commit SHA that triggered the workflow (GITHUB_SHA).