GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - numtide/github-deploy: Track deployments on GitHub PRs

BranchesTags
Open more actions menu

Latest commit

 

History

88 Commits
88 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
command
command
 
 
gitsrc
gitsrc
 
 
.envrc
.envrc
 
 
.gitignore
.gitignore
 
 
.golangci.yml
.golangci.yml
 
 
.goreleaser.yml
.goreleaser.yml
 
 
CHANGELOG.md
CHANGELOG.md
 
 
Justfile
Justfile
 
 
NOTES.md
NOTES.md
 
 
README.md
README.md
 
 
commands.go
commands.go
 
 
default.nix
default.nix
 
 
flake.lock
flake.lock
 
 
flake.lock.nix
flake.lock.nix
 
 
flake.nix
flake.nix
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
main.go
main.go
 
 
shell.nix
shell.nix
 
 
treefmt.toml
treefmt.toml
 
 
version.go
version.go
 
 

Repository files navigation

github-deploy - Track deployments on GitHub

built with nix

An opinionated command-line utility that integrates deployments with the github Deployment API.

Description

This is a wrapper command that abstracts the deployment method through a set of scripts which interfaces are clearly defined.

The wrapper command tracks the deployment statuses by interacting with the github API.

Assumptions

The command is being run in the checkout of the project that is about to be deployed, with the right git commit checked out.

Usage

$ ./github-deploy --help

NAME:
   github-deploy - A CLI that integrates deployments with github

USAGE:
   github-deploy [global options] command [command options] [arguments...]

VERSION:
   0.6.2

AUTHOR:
   zimbatm <[email protected]>

COMMANDS:
     please   Initiates a deployment
     cleanup  Removes deployments
     help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --git-commit value    git commit ID [$GITHUB_SHA, $BUILDKITE_COMMIT, $CIRCLE_SHA1, $TRAVIS_PULL_REQUEST_SHA]
   --git-branch value    git branch [$GITHUB_REF, $BUILDKITE_BRANCH, $CIRCLE_BRANCH, $TRAVIS_BRANCH]
   --git-origin value    URL of the repo [$BUILDKITE_REPO, $CIRCLE_REPOSITORY_URL]
   --git-ref-commit      use the commit as deployment reference instead of branch
   --github-token value  Github Personal access token to interact with the Github API (default: <secret:github-token>) [$GITHUB_TOKEN]
   --help, -h            show help
   --version, -v         print the version

Scripts interface

DEPLOY_SCRIPT <TARGET>

The deploy script takes an optional deployment name an argument and returns the target URL on stdout.

Depending on the script exit status, the deployment is marked as a failure or success.

LIST_SCRIPT

Returns the list of all the temporary deployments on stdout.

UNDEPLOY_SCRIPT <TARGET>

Deletes a deployment named <TARGET>. Should not undeploy production.

Install

To install, use go get:

$ go get -d github.com/zimbatm/github-deploy

Setup

Create a token

Go to https://github.com/settings/tokens/new

Select repo

export GITHUB_TOKEN=

Create the wrapper scripts

TODO example

Contribution

  1. Fork (https://github.com/zimbatm/github-deploy/fork)
  2. Create a feature branch
  3. Commit your changes
  4. Rebase your local changes against the main branch
  5. Run test suite with the go test ./... command and confirm that it passes
  6. Run gofmt -s
  7. Create a new Pull Request

Author

zimbatm

License

MIT

About

Track deployments on GitHub PRs

Topics

cicligithub-deployment

Resources

Readme

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

15 stars

Watchers

8 watching

Forks

2 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.