1. Packages
  2. Packages
  3. Github Provider
  4. API Docs
  5. RepositoryPages
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

    This resource allows you to manage GitHub Pages for a repository. See the documentation for details on GitHub Pages.

    The authenticated user must be a repository administrator, maintainer, or have the ‘manage GitHub Pages settings’ permission. OAuth app tokens and personal access tokens (classic) need the repo scope to use this resource.

    Example Usage

    Legacy Build Type

    import * as pulumi from "@pulumi/pulumi";
    import * as github from "@pulumi/github";
    
    const example = new github.Repository("example", {
        name: "my-repo",
        visibility: "public",
        autoInit: true,
    });
    const exampleRepositoryPages = new github.RepositoryPages("example", {
        repository: example.name,
        buildType: "legacy",
        source: {
            branch: "main",
            path: "/",
        },
    });
    
    import pulumi
    import pulumi_github as github
    
    example = github.Repository("example",
        name="my-repo",
        visibility="public",
        auto_init=True)
    example_repository_pages = github.RepositoryPages("example",
        repository=example.name,
        build_type="legacy",
        source={
            "branch": "main",
            "path": "/",
        })
    
    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 {
    		example, err := github.NewRepository(ctx, "example", &github.RepositoryArgs{
    			Name:       pulumi.String("my-repo"),
    			Visibility: pulumi.String("public"),
    			AutoInit:   pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = github.NewRepositoryPages(ctx, "example", &github.RepositoryPagesArgs{
    			Repository: example.Name,
    			BuildType:  pulumi.String("legacy"),
    			Source: &github.RepositoryPagesSourceArgs{
    				Branch: pulumi.String("main"),
    				Path:   pulumi.String("/"),
    			},
    		})
    		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 = new Github.Index.Repository("example", new()
        {
            Name = "my-repo",
            Visibility = "public",
            AutoInit = true,
        });
    
        var exampleRepositoryPages = new Github.Index.RepositoryPages("example", new()
        {
            Repository = example.Name,
            BuildType = "legacy",
            Source = new Github.Inputs.RepositoryPagesSourceArgs
            {
                Branch = "main",
                Path = "/",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.github.Repository;
    import com.pulumi.github.RepositoryArgs;
    import com.pulumi.github.RepositoryPages;
    import com.pulumi.github.RepositoryPagesArgs;
    import com.pulumi.github.inputs.RepositoryPagesSourceArgs;
    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) {
            var example = new Repository("example", RepositoryArgs.builder()
                .name("my-repo")
                .visibility("public")
                .autoInit(true)
                .build());
    
            var exampleRepositoryPages = new RepositoryPages("exampleRepositoryPages", RepositoryPagesArgs.builder()
                .repository(example.name())
                .buildType("legacy")
                .source(RepositoryPagesSourceArgs.builder()
                    .branch("main")
                    .path("/")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: github:Repository
        properties:
          name: my-repo
          visibility: public
          autoInit: true
      exampleRepositoryPages:
        type: github:RepositoryPages
        name: example
        properties:
          repository: ${example.name}
          buildType: legacy
          source:
            branch: main
            path: /
    

    Workflow Build Type (GitHub Actions)

    import * as pulumi from "@pulumi/pulumi";
    import * as github from "@pulumi/github";
    
    const example = new github.Repository("example", {
        name: "my-repo",
        visibility: "public",
        autoInit: true,
    });
    const exampleRepositoryPages = new github.RepositoryPages("example", {
        repository: example.name,
        buildType: "workflow",
    });
    
    import pulumi
    import pulumi_github as github
    
    example = github.Repository("example",
        name="my-repo",
        visibility="public",
        auto_init=True)
    example_repository_pages = github.RepositoryPages("example",
        repository=example.name,
        build_type="workflow")
    
    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 {
    		example, err := github.NewRepository(ctx, "example", &github.RepositoryArgs{
    			Name:       pulumi.String("my-repo"),
    			Visibility: pulumi.String("public"),
    			AutoInit:   pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = github.NewRepositoryPages(ctx, "example", &github.RepositoryPagesArgs{
    			Repository: example.Name,
    			BuildType:  pulumi.String("workflow"),
    		})
    		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 = new Github.Index.Repository("example", new()
        {
            Name = "my-repo",
            Visibility = "public",
            AutoInit = true,
        });
    
        var exampleRepositoryPages = new Github.Index.RepositoryPages("example", new()
        {
            Repository = example.Name,
            BuildType = "workflow",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.github.Repository;
    import com.pulumi.github.RepositoryArgs;
    import com.pulumi.github.RepositoryPages;
    import com.pulumi.github.RepositoryPagesArgs;
    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) {
            var example = new Repository("example", RepositoryArgs.builder()
                .name("my-repo")
                .visibility("public")
                .autoInit(true)
                .build());
    
            var exampleRepositoryPages = new RepositoryPages("exampleRepositoryPages", RepositoryPagesArgs.builder()
                .repository(example.name())
                .buildType("workflow")
                .build());
    
        }
    }
    
    resources:
      example:
        type: github:Repository
        properties:
          name: my-repo
          visibility: public
          autoInit: true
      exampleRepositoryPages:
        type: github:RepositoryPages
        name: example
        properties:
          repository: ${example.name}
          buildType: workflow
    

    With Custom Domain

    import * as pulumi from "@pulumi/pulumi";
    import * as github from "@pulumi/github";
    
    const example = new github.Repository("example", {
        name: "my-repo",
        visibility: "public",
        autoInit: true,
    });
    const exampleRepositoryPages = new github.RepositoryPages("example", {
        repository: example.name,
        buildType: "legacy",
        cname: "example.com",
        httpsEnforced: true,
        source: {
            branch: "main",
            path: "/docs",
        },
    });
    
    import pulumi
    import pulumi_github as github
    
    example = github.Repository("example",
        name="my-repo",
        visibility="public",
        auto_init=True)
    example_repository_pages = github.RepositoryPages("example",
        repository=example.name,
        build_type="legacy",
        cname="example.com",
        https_enforced=True,
        source={
            "branch": "main",
            "path": "/docs",
        })
    
    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 {
    		example, err := github.NewRepository(ctx, "example", &github.RepositoryArgs{
    			Name:       pulumi.String("my-repo"),
    			Visibility: pulumi.String("public"),
    			AutoInit:   pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = github.NewRepositoryPages(ctx, "example", &github.RepositoryPagesArgs{
    			Repository:    example.Name,
    			BuildType:     pulumi.String("legacy"),
    			Cname:         pulumi.String("example.com"),
    			HttpsEnforced: pulumi.Bool(true),
    			Source: &github.RepositoryPagesSourceArgs{
    				Branch: pulumi.String("main"),
    				Path:   pulumi.String("/docs"),
    			},
    		})
    		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 = new Github.Index.Repository("example", new()
        {
            Name = "my-repo",
            Visibility = "public",
            AutoInit = true,
        });
    
        var exampleRepositoryPages = new Github.Index.RepositoryPages("example", new()
        {
            Repository = example.Name,
            BuildType = "legacy",
            Cname = "example.com",
            HttpsEnforced = true,
            Source = new Github.Inputs.RepositoryPagesSourceArgs
            {
                Branch = "main",
                Path = "/docs",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.github.Repository;
    import com.pulumi.github.RepositoryArgs;
    import com.pulumi.github.RepositoryPages;
    import com.pulumi.github.RepositoryPagesArgs;
    import com.pulumi.github.inputs.RepositoryPagesSourceArgs;
    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) {
            var example = new Repository("example", RepositoryArgs.builder()
                .name("my-repo")
                .visibility("public")
                .autoInit(true)
                .build());
    
            var exampleRepositoryPages = new RepositoryPages("exampleRepositoryPages", RepositoryPagesArgs.builder()
                .repository(example.name())
                .buildType("legacy")
                .cname("example.com")
                .httpsEnforced(true)
                .source(RepositoryPagesSourceArgs.builder()
                    .branch("main")
                    .path("/docs")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: github:Repository
        properties:
          name: my-repo
          visibility: public
          autoInit: true
      exampleRepositoryPages:
        type: github:RepositoryPages
        name: example
        properties:
          repository: ${example.name}
          buildType: legacy
          cname: example.com
          httpsEnforced: true
          source:
            branch: main
            path: /docs
    

    Create RepositoryPages Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new RepositoryPages(name: string, args: RepositoryPagesArgs, opts?: CustomResourceOptions);
    @overload
    def RepositoryPages(resource_name: str,
                        args: RepositoryPagesInitArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def RepositoryPages(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        repository: Optional[str] = None,
                        build_type: Optional[str] = None,
                        cname: Optional[str] = None,
                        https_enforced: Optional[bool] = None,
                        public: Optional[bool] = None,
                        source: Optional[RepositoryPagesSourceArgs] = None)
    func NewRepositoryPages(ctx *Context, name string, args RepositoryPagesArgs, opts ...ResourceOption) (*RepositoryPages, error)
    public RepositoryPages(string name, RepositoryPagesArgs args, CustomResourceOptions? opts = null)
    public RepositoryPages(String name, RepositoryPagesArgs args)
    public RepositoryPages(String name, RepositoryPagesArgs args, CustomResourceOptions options)
    
    type: github:RepositoryPages
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args RepositoryPagesArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args RepositoryPagesInitArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args RepositoryPagesArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RepositoryPagesArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RepositoryPagesArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var repositoryPagesResource = new Github.RepositoryPages("repositoryPagesResource", new()
    {
        Repository = "string",
        BuildType = "string",
        Cname = "string",
        HttpsEnforced = false,
        Public = false,
        Source = new Github.Inputs.RepositoryPagesSourceArgs
        {
            Branch = "string",
            Path = "string",
        },
    });
    
    example, err := github.NewRepositoryPages(ctx, "repositoryPagesResource", &github.RepositoryPagesArgs{
    	Repository:    pulumi.String("string"),
    	BuildType:     pulumi.String("string"),
    	Cname:         pulumi.String("string"),
    	HttpsEnforced: pulumi.Bool(false),
    	Public:        pulumi.Bool(false),
    	Source: &github.RepositoryPagesSourceArgs{
    		Branch: pulumi.String("string"),
    		Path:   pulumi.String("string"),
    	},
    })
    
    var repositoryPagesResource = new RepositoryPages("repositoryPagesResource", RepositoryPagesArgs.builder()
        .repository("string")
        .buildType("string")
        .cname("string")
        .httpsEnforced(false)
        .public_(false)
        .source(RepositoryPagesSourceArgs.builder()
            .branch("string")
            .path("string")
            .build())
        .build());
    
    repository_pages_resource = github.RepositoryPages("repositoryPagesResource",
        repository="string",
        build_type="string",
        cname="string",
        https_enforced=False,
        public=False,
        source={
            "branch": "string",
            "path": "string",
        })
    
    const repositoryPagesResource = new github.RepositoryPages("repositoryPagesResource", {
        repository: "string",
        buildType: "string",
        cname: "string",
        httpsEnforced: false,
        "public": false,
        source: {
            branch: "string",
            path: "string",
        },
    });
    
    type: github:RepositoryPages
    properties:
        buildType: string
        cname: string
        httpsEnforced: false
        public: false
        repository: string
        source:
            branch: string
            path: string
    

    RepositoryPages Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The RepositoryPages resource accepts the following input properties:

    Repository string
    The repository name to configure GitHub Pages for.
    BuildType string
    The type of GitHub Pages site to build. Can be legacy or workflow. Defaults to legacy.
    Cname string
    The custom domain for the repository.
    HttpsEnforced bool
    Whether HTTPS is enforced for the GitHub Pages site. GitHub Pages sites serve over HTTPS by default; this setting only applies when a custom domain (cname) is configured. Requires cname to be set.
    Public bool
    Whether the GitHub Pages site is public.
    Source RepositoryPagesSource
    The source branch and directory for the rendered Pages site. Required when buildType is legacy. See Source below for details.
    Repository string
    The repository name to configure GitHub Pages for.
    BuildType string
    The type of GitHub Pages site to build. Can be legacy or workflow. Defaults to legacy.
    Cname string
    The custom domain for the repository.
    HttpsEnforced bool
    Whether HTTPS is enforced for the GitHub Pages site. GitHub Pages sites serve over HTTPS by default; this setting only applies when a custom domain (cname) is configured. Requires cname to be set.
    Public bool
    Whether the GitHub Pages site is public.
    Source RepositoryPagesSourceArgs
    The source branch and directory for the rendered Pages site. Required when buildType is legacy. See Source below for details.
    repository String
    The repository name to configure GitHub Pages for.
    buildType String
    The type of GitHub Pages site to build. Can be legacy or workflow. Defaults to legacy.
    cname String
    The custom domain for the repository.
    httpsEnforced Boolean
    Whether HTTPS is enforced for the GitHub Pages site. GitHub Pages sites serve over HTTPS by default; this setting only applies when a custom domain (cname) is configured. Requires cname to be set.
    public_ Boolean
    Whether the GitHub Pages site is public.
    source RepositoryPagesSource
    The source branch and directory for the rendered Pages site. Required when buildType is legacy. See Source below for details.
    repository string
    The repository name to configure GitHub Pages for.
    buildType string
    The type of GitHub Pages site to build. Can be legacy or workflow. Defaults to legacy.
    cname string
    The custom domain for the repository.
    httpsEnforced boolean
    Whether HTTPS is enforced for the GitHub Pages site. GitHub Pages sites serve over HTTPS by default; this setting only applies when a custom domain (cname) is configured. Requires cname to be set.
    public boolean
    Whether the GitHub Pages site is public.
    source RepositoryPagesSource
    The source branch and directory for the rendered Pages site. Required when buildType is legacy. See Source below for details.
    repository str
    The repository name to configure GitHub Pages for.
    build_type str
    The type of GitHub Pages site to build. Can be legacy or workflow. Defaults to legacy.
    cname str
    The custom domain for the repository.
    https_enforced bool
    Whether HTTPS is enforced for the GitHub Pages site. GitHub Pages sites serve over HTTPS by default; this setting only applies when a custom domain (cname) is configured. Requires cname to be set.
    public bool
    Whether the GitHub Pages site is public.
    source RepositoryPagesSourceArgs
    The source branch and directory for the rendered Pages site. Required when buildType is legacy. See Source below for details.
    repository String
    The repository name to configure GitHub Pages for.
    buildType String
    The type of GitHub Pages site to build. Can be legacy or workflow. Defaults to legacy.
    cname String
    The custom domain for the repository.
    httpsEnforced Boolean
    Whether HTTPS is enforced for the GitHub Pages site. GitHub Pages sites serve over HTTPS by default; this setting only applies when a custom domain (cname) is configured. Requires cname to be set.
    public Boolean
    Whether the GitHub Pages site is public.
    source Property Map
    The source branch and directory for the rendered Pages site. Required when buildType is legacy. See Source below for details.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the RepositoryPages resource produces the following output properties:

    ApiUrl string
    The API URL of the GitHub Pages resource.
    BuildStatus string
    The GitHub Pages site's build status (e.g., building or built).
    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.
    Id string
    The provider-assigned unique ID for this managed resource.
    RepositoryId int
    The ID of the repository.
    ApiUrl string
    The API URL of the GitHub Pages resource.
    BuildStatus string
    The GitHub Pages site's build status (e.g., building or built).
    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.
    Id string
    The provider-assigned unique ID for this managed resource.
    RepositoryId int
    The ID of the repository.
    apiUrl String
    The API URL of the GitHub Pages resource.
    buildStatus String
    The GitHub Pages site's build status (e.g., building or built).
    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.
    id String
    The provider-assigned unique ID for this managed resource.
    repositoryId Integer
    The ID of the repository.
    apiUrl string
    The API URL of the GitHub Pages resource.
    buildStatus string
    The GitHub Pages site's build status (e.g., building or built).
    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.
    id string
    The provider-assigned unique ID for this managed resource.
    repositoryId number
    The ID of the repository.
    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).
    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.
    id str
    The provider-assigned unique ID for this managed resource.
    repository_id int
    The ID of the repository.
    apiUrl String
    The API URL of the GitHub Pages resource.
    buildStatus String
    The GitHub Pages site's build status (e.g., building or built).
    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.
    id String
    The provider-assigned unique ID for this managed resource.
    repositoryId Number
    The ID of the repository.

    Look up Existing RepositoryPages Resource

    Get an existing RepositoryPages resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: RepositoryPagesState, opts?: CustomResourceOptions): RepositoryPages
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            api_url: Optional[str] = None,
            build_status: Optional[str] = None,
            build_type: Optional[str] = None,
            cname: Optional[str] = None,
            custom404: Optional[bool] = None,
            html_url: Optional[str] = None,
            https_enforced: Optional[bool] = None,
            public: Optional[bool] = None,
            repository: Optional[str] = None,
            repository_id: Optional[int] = None,
            source: Optional[RepositoryPagesSourceArgs] = None) -> RepositoryPages
    func GetRepositoryPages(ctx *Context, name string, id IDInput, state *RepositoryPagesState, opts ...ResourceOption) (*RepositoryPages, error)
    public static RepositoryPages Get(string name, Input<string> id, RepositoryPagesState? state, CustomResourceOptions? opts = null)
    public static RepositoryPages get(String name, Output<String> id, RepositoryPagesState state, CustomResourceOptions options)
    resources:  _:    type: github:RepositoryPages    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    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 to build. Can be legacy or workflow. Defaults to legacy.
    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. GitHub Pages sites serve over HTTPS by default; this setting only applies when a custom domain (cname) is configured. Requires cname to be set.
    Public bool
    Whether the GitHub Pages site is public.
    Repository string
    The repository name to configure GitHub Pages for.
    RepositoryId int
    The ID of the repository.
    Source RepositoryPagesSource
    The source branch and directory for the rendered Pages site. Required when buildType is legacy. 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 to build. Can be legacy or workflow. Defaults to legacy.
    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. GitHub Pages sites serve over HTTPS by default; this setting only applies when a custom domain (cname) is configured. Requires cname to be set.
    Public bool
    Whether the GitHub Pages site is public.
    Repository string
    The repository name to configure GitHub Pages for.
    RepositoryId int
    The ID of the repository.
    Source RepositoryPagesSourceArgs
    The source branch and directory for the rendered Pages site. Required when buildType is legacy. 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 to build. Can be legacy or workflow. Defaults to legacy.
    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. GitHub Pages sites serve over HTTPS by default; this setting only applies when a custom domain (cname) is configured. Requires cname to be set.
    public_ Boolean
    Whether the GitHub Pages site is public.
    repository String
    The repository name to configure GitHub Pages for.
    repositoryId Integer
    The ID of the repository.
    source RepositoryPagesSource
    The source branch and directory for the rendered Pages site. Required when buildType is legacy. 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 to build. Can be legacy or workflow. Defaults to legacy.
    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. GitHub Pages sites serve over HTTPS by default; this setting only applies when a custom domain (cname) is configured. Requires cname to be set.
    public boolean
    Whether the GitHub Pages site is public.
    repository string
    The repository name to configure GitHub Pages for.
    repositoryId number
    The ID of the repository.
    source RepositoryPagesSource
    The source branch and directory for the rendered Pages site. Required when buildType is legacy. 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 to build. Can be legacy or workflow. Defaults to legacy.
    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. GitHub Pages sites serve over HTTPS by default; this setting only applies when a custom domain (cname) is configured. Requires cname to be set.
    public bool
    Whether the GitHub Pages site is public.
    repository str
    The repository name to configure GitHub Pages for.
    repository_id int
    The ID of the repository.
    source RepositoryPagesSourceArgs
    The source branch and directory for the rendered Pages site. Required when buildType is legacy. 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 to build. Can be legacy or workflow. Defaults to legacy.
    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. GitHub Pages sites serve over HTTPS by default; this setting only applies when a custom domain (cname) is configured. Requires cname to be set.
    public Boolean
    Whether the GitHub Pages site is public.
    repository String
    The repository name to configure GitHub Pages for.
    repositoryId Number
    The ID of the repository.
    source Property Map
    The source branch and directory for the rendered Pages site. Required when buildType is legacy. See Source below for details.

    Supporting Types

    RepositoryPagesSource, RepositoryPagesSourceArgs

    Branch string
    The repository branch used to publish the site's source files (e.g., main or gh-pages).
    Path string
    The repository directory from which the site publishes. Defaults to /. Can be / or /docs.
    Branch string
    The repository branch used to publish the site's source files (e.g., main or gh-pages).
    Path string
    The repository directory from which the site publishes. Defaults to /. Can be / or /docs.
    branch String
    The repository branch used to publish the site's source files (e.g., main or gh-pages).
    path String
    The repository directory from which the site publishes. Defaults to /. Can be / or /docs.
    branch string
    The repository branch used to publish the site's source files (e.g., main or gh-pages).
    path string
    The repository directory from which the site publishes. Defaults to /. Can be / or /docs.
    branch str
    The repository branch used to publish the site's source files (e.g., main or gh-pages).
    path str
    The repository directory from which the site publishes. Defaults to /. Can be / or /docs.
    branch String
    The repository branch used to publish the site's source files (e.g., main or gh-pages).
    path String
    The repository directory from which the site publishes. Defaults to /. Can be / or /docs.

    Import

    GitHub repository pages can be imported using the repository-slug, e.g.

    $ pulumi import github:index/repositoryPages:RepositoryPages example my-repo
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.