← 返回首页
platform-samples/api/java/deployment at master · github/platform-samples · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Latest commit

 

History

History
 master
Top

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
View all files

README.md

DeployServer

A sample implementation for using GitHub Deployment API.

Ported this by Java. Powered by Spark.

Prerequisite

  • JDK8
  • Maven3
  • GitHub OAuth Token

Getting Started

First, you should set your OAuth token into an environment variable somewhere, like:

export GITHUB_OAUTH=xxxxxxx

After that, you can:

  • For development
$ mvn compile exec:java

If you aren't familiar with CLI, you can just run the main class via an execution button in your IDE as well.

  • For deployment
$ mvn clean package $ java -jar target/DeployServer-{version}.jar

Then you can see it works on http://localhost:4567.

After you make sure this sever deployed a place where GitHub can reach out to, you can test how it interacts with GitHub via its Deployment API.

You can also place it on your local pc, then expose it by using ngrok. Please refer the direction described here.

Footer

© 2026 GitHub, Inc.