1. Packages
  2. Packages
  3. Github Provider
  4. API Docs
  5. getRepositoryPages
Viewing docs for GitHub v6.13.1
published on Wednesday, Apr 29, 2026 by Pulumi
github logo
Viewing docs for GitHub v6.13.1
published on Wednesday, Apr 29, 2026 by Pulumi

    Use this data source to retrieve GitHub Pages configuration for a repository.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as github from "@pulumi/github";
    
    const example = github.getRepositoryPages({
        repository: "my-repo",
    });
    
    import pulumi
    import pulumi_github as github
    
    example = github.get_repository_pages(repository="my-repo")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-github/sdk/v6/go/github"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := github.GetRepositoryPages(ctx, &github.LookupRepositoryPagesArgs{
    			Repository: "my-repo",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Github = Pulumi.Github;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Github.Index.GetRepositoryPages.Invoke(new()
        {
            Repository = "my-repo",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.github.GithubFunctions;
    import com.pulumi.github.inputs.GetRepositoryPagesArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var example = GithubFunctions.getRepositoryPages(GetRepositoryPagesArgs.builder()
                .repository("my-repo")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: github:getRepositoryPages
          arguments:
            repository: my-repo
    

    Using getRepositoryPages

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getRepositoryPages(args: GetRepositoryPagesArgs, opts?: InvokeOptions): Promise<GetRepositoryPagesResult>
    function getRepositoryPagesOutput(args: GetRepositoryPagesOutputArgs, opts?: InvokeOptions): Output<GetRepositoryPagesResult>
    def get_repository_pages(repository: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetRepositoryPagesResult
    def get_repository_pages_output(repository: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetRepositoryPagesResult]
    func LookupRepositoryPages(ctx *Context, args *LookupRepositoryPagesArgs, opts ...InvokeOption) (*LookupRepositoryPagesResult, error)
    func LookupRepositoryPagesOutput(ctx *Context, args *LookupRepositoryPagesOutputArgs, opts ...InvokeOption) LookupRepositoryPagesResultOutput

    > Note: This function is named LookupRepositoryPages in the Go SDK.

    public static class GetRepositoryPages 
    {
        public static Task<GetRepositoryPagesResult> InvokeAsync(GetRepositoryPagesArgs args, InvokeOptions? opts = null)
        public static Output<GetRepositoryPagesResult> Invoke(GetRepositoryPagesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRepositoryPagesResult> getRepositoryPages(GetRepositoryPagesArgs args, InvokeOptions options)
    public static Output<GetRepositoryPagesResult> getRepositoryPages(GetRepositoryPagesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: github:index/getRepositoryPages:getRepositoryPages
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Repository string
    The repository name to get GitHub Pages information for.
    Repository string
    The repository name to get GitHub Pages information for.
    repository String
    The repository name to get GitHub Pages information for.
    repository string
    The repository name to get GitHub Pages information for.
    repository str
    The repository name to get GitHub Pages information for.
    repository String
    The repository name to get GitHub Pages information for.

    getRepositoryPages Result

    The following output properties are available:

    ApiUrl string
    The API URL of the GitHub Pages resource.
    BuildStatus string
    The GitHub Pages site's build status (e.g., building or built).
    BuildType string
    The type of GitHub Pages site. Can be legacy or workflow.
    Cname string
    The custom domain for the repository.
    Custom404 bool
    Whether the rendered GitHub Pages site has a custom 404 page.
    HtmlUrl string
    The absolute URL (with scheme) to the rendered GitHub Pages site.
    HttpsEnforced bool
    Whether HTTPS is enforced for the GitHub Pages site. This setting only applies when a custom domain is configured.
    Id string
    The provider-assigned unique ID for this managed resource.
    Public bool
    Whether the GitHub Pages site is public.
    Repository string
    Sources List<GetRepositoryPagesSource>
    The source branch and directory for the rendered Pages site. See Source below for details.
    ApiUrl string
    The API URL of the GitHub Pages resource.
    BuildStatus string
    The GitHub Pages site's build status (e.g., building or built).
    BuildType string
    The type of GitHub Pages site. Can be legacy or workflow.
    Cname string
    The custom domain for the repository.
    Custom404 bool
    Whether the rendered GitHub Pages site has a custom 404 page.
    HtmlUrl string
    The absolute URL (with scheme) to the rendered GitHub Pages site.
    HttpsEnforced bool
    Whether HTTPS is enforced for the GitHub Pages site. This setting only applies when a custom domain is configured.
    Id string
    The provider-assigned unique ID for this managed resource.
    Public bool
    Whether the GitHub Pages site is public.
    Repository string
    Sources []GetRepositoryPagesSource
    The source branch and directory for the rendered Pages site. See Source below for details.
    apiUrl String
    The API URL of the GitHub Pages resource.
    buildStatus String
    The GitHub Pages site's build status (e.g., building or built).
    buildType String
    The type of GitHub Pages site. Can be legacy or workflow.
    cname String
    The custom domain for the repository.
    custom404 Boolean
    Whether the rendered GitHub Pages site has a custom 404 page.
    htmlUrl String
    The absolute URL (with scheme) to the rendered GitHub Pages site.
    httpsEnforced Boolean
    Whether HTTPS is enforced for the GitHub Pages site. This setting only applies when a custom domain is configured.
    id String
    The provider-assigned unique ID for this managed resource.
    public_ Boolean
    Whether the GitHub Pages site is public.
    repository String
    sources List<GetRepositoryPagesSource>
    The source branch and directory for the rendered Pages site. See Source below for details.
    apiUrl string
    The API URL of the GitHub Pages resource.
    buildStatus string
    The GitHub Pages site's build status (e.g., building or built).
    buildType string
    The type of GitHub Pages site. Can be legacy or workflow.
    cname string
    The custom domain for the repository.
    custom404 boolean
    Whether the rendered GitHub Pages site has a custom 404 page.
    htmlUrl string
    The absolute URL (with scheme) to the rendered GitHub Pages site.
    httpsEnforced boolean
    Whether HTTPS is enforced for the GitHub Pages site. This setting only applies when a custom domain is configured.
    id string
    The provider-assigned unique ID for this managed resource.
    public boolean
    Whether the GitHub Pages site is public.
    repository string
    sources GetRepositoryPagesSource[]
    The source branch and directory for the rendered Pages site. See Source below for details.
    api_url str
    The API URL of the GitHub Pages resource.
    build_status str
    The GitHub Pages site's build status (e.g., building or built).
    build_type str
    The type of GitHub Pages site. Can be legacy or workflow.
    cname str
    The custom domain for the repository.
    custom404 bool
    Whether the rendered GitHub Pages site has a custom 404 page.
    html_url str
    The absolute URL (with scheme) to the rendered GitHub Pages site.
    https_enforced bool
    Whether HTTPS is enforced for the GitHub Pages site. This setting only applies when a custom domain is configured.
    id str
    The provider-assigned unique ID for this managed resource.
    public bool
    Whether the GitHub Pages site is public.
    repository str
    sources Sequence[GetRepositoryPagesSource]
    The source branch and directory for the rendered Pages site. See Source below for details.
    apiUrl String
    The API URL of the GitHub Pages resource.
    buildStatus String
    The GitHub Pages site's build status (e.g., building or built).
    buildType String
    The type of GitHub Pages site. Can be legacy or workflow.
    cname String
    The custom domain for the repository.
    custom404 Boolean
    Whether the rendered GitHub Pages site has a custom 404 page.
    htmlUrl String
    The absolute URL (with scheme) to the rendered GitHub Pages site.
    httpsEnforced Boolean
    Whether HTTPS is enforced for the GitHub Pages site. This setting only applies when a custom domain is configured.
    id String
    The provider-assigned unique ID for this managed resource.
    public Boolean
    Whether the GitHub Pages site is public.
    repository String
    sources List<Property Map>
    The source branch and directory for the rendered Pages site. See Source below for details.

    Supporting Types

    GetRepositoryPagesSource

    Branch string
    The repository branch used to publish the site's source files.
    Path string
    The repository directory from which the site publishes.
    Branch string
    The repository branch used to publish the site's source files.
    Path string
    The repository directory from which the site publishes.
    branch String
    The repository branch used to publish the site's source files.
    path String
    The repository directory from which the site publishes.
    branch string
    The repository branch used to publish the site's source files.
    path string
    The repository directory from which the site publishes.
    branch str
    The repository branch used to publish the site's source files.
    path str
    The repository directory from which the site publishes.
    branch String
    The repository branch used to publish the site's source files.
    path String
    The repository directory from which the site publishes.

    Package Details

    Repository
    GitHub pulumi/pulumi-github
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the github Terraform Provider.
    github logo
    Viewing docs for GitHub v6.13.1
    published on Wednesday, Apr 29, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.