{"modulePath":"github.com/intentdriven/abcd","version":"v0.17.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package githubpages\n\nPackage githubpages is the hosting provider that publishes a project's site on its own GitHub Pages (itd-2610091010348892): the project's release workflow builds the about page and development record at each release, and GitHub hosts them at owner.github.io/\\\u003crepo\u003e/, or at a custom domain.\n\nThe repository half holds no secret. The deploy job runs in the \\`github-pages\\` environment with the run's own short-lived token and three permissions (contents: read, pages: write, id-token: write), and deploys the rendered site through actions/upload-pages-artifact and actions/deploy-pages, each pinned to a full commit. There is no host configuration file, and GitHub Pages serves no response header a site declares: a \\`\\_headers\\` file would be served as a plain file and protect nothing. So the project build writes none, and each page carries its content policy in its own head (internal/core/site's project\\_policy.go, iss-2610142036270003). The framing refusal and \\`nosniff\\` have no in-page form, and a Pages site goes without them.\n\nThe host half speaks the GitHub REST API through the forge, as the person who invoked the verb — the way the site setup's forge stage does, so abcd holds no GitHub token and resolves no credential:\n\n\tGET  repos/{owner}/{repo}         is it public, and has it a Pages site\n\tGET  repos/{owner}/{repo}/pages   the site's source, domain and address\n\tPOST repos/{owner}/{repo}/pages   create the site, built by a workflow\n\tPUT  repos/{owner}/{repo}/pages   route a custom domain to it\n\nThese calls are written against GitHub's published REST reference and are exercised in this repository only against githubpagestest's in-process fake.\n\nPublic repositories only, for now: Pages on a private repository is access-controlled only on GitHub's enterprise plan, so a private repository is refused rather than published.\n\n## Constants\n\n```go\nconst Environment = \"github-pages\"\n```\nEnvironment is the forge environment GitHub Pages deploys through.\n\n## Types\n\n```go\ntype API func(ctx context.Context, method, path string, body []byte) ([]byte, error)\n```\nAPI makes one GitHub REST call through the forge, as the person who invoked the verb: method, a repo-relative API path (\"repos/acme/widgets/pages\") and a JSON body or nil. A non-2xx answer is an error naming its HTTP status.\n\n```go\ntype Adapter struct {\n\tAPI API\n}\n```\nAdapter is the github-pages provider. API is the forge; nil reaches nothing.\n\n```go\nfunc (a Adapter) Connect(string) hosting.Provider\n```\nConnect returns the host half. The provider holds no token, so the one it is handed is ignored.\n\n```go\nfunc (Adapter) CredentialName() string\n```\nCredentialName is empty: the provider acts through the forge as the person.\n\n```go\nfunc (Adapter) DeployStep() string\n```\nDeployStep hands the unpacked ./site to Pages and deploys it.\n\n```go\nfunc (Adapter) HostConfig(hosting.Site) (string, []byte)\n```\nHostConfig: the provider reads no configuration file.\n\n```go\nfunc (Adapter) Name() string\n```\nName is the manifest key.\n\n```go\nfunc (Adapter) Profile(s hosting.Site) hosting.Profile\n```\nProfile: the \\`github-pages\\` environment, the run's token with Pages and OIDC rights, the switch, public repositories only, a project site built from what abcd writes, and the project path GitHub serves the site below.\n\n```go\nfunc (Adapter) Secrets() []string\n```\nSecrets: none. The deploy job uses the run's own token.\n\n","path":"github.com/intentdriven/abcd/internal/adapter/hosting/githubpages","name":"githubpages","synopsis":"Package githubpages is the hosting provider that publishes a project's site on its own GitHub Pages (itd-2610091010348892): the project's release workflow builds the about page and development record at each release, and GitHub hosts them at owner.github.io/\u003crepo\u003e/, or at a custom domain.","isRedistributable":true}
