GitHub
GitHub hosts git repositories and the work around them: reviewing changes in pull requests, tracking issues, and running CI/CD with Actions.
Actions builds, tests and deploys on every push, using credentials kept in its secrets and variables. Environments guard production behind reviews. Webhooks tell other systems when something happens in a repository.
New to GitHub? Start with What is GitHub?.
A quick example
Section titled “A quick example”A repository, with its settings kept in code:
const repo = yield* GitHub.Repository("api", { owner: "my-org", name: "api", autoInit: true });Actions variables set from another resource’s outputs:
yield* GitHub.Variables({ owner: "my-org", repository: "api", variables: { AWS_ROLE_ARN: role.roleArn, AWS_REGION: region },});And one comment per pull request, updated on every deploy with the preview’s URL:
yield* GitHub.Comment("preview-comment", { owner: "my-org", repository: "api", issueNumber: yield* Config.Number("PULL_REQUEST"), body: Output.interpolate`Preview: ${website.url}`,});Where to start
Section titled “Where to start”Want to build? Connect your token in Setup, then CI walks through a GitHub Actions workflow with a stage per pull request.
Looking for something specific? Every section of these docs is listed below, and every resource is in the generated API reference.