---
search:
  tags:
    - sites
    - PUT
seo:
  description: >-
    Sets, or replaces, the repository the site is built from: one the org's
    GitHub… Reference for the PUT /v1/sites/{site}/source endpoint in the
    pols.so API.
sidebar:
  label: Build a site from a GitHub repository
  badge: PUT
title: Build a site from a GitHub repository
type: openapi-operation
---
Sets, or replaces, the repository the site is built from: one the
org's GitHub installations let pols read (`GET
/v1/github/repositories`). What the request leaves out takes its
default: the repository's default branch, and build settings
detected from the project's files (`preset` says which kind of
project they were taken for). A project pols does not recognize
needs `output_dir`. Building comes with the deploys.

`PUT /v1/sites/{site}/source`
