Summary
Add a .github/workflows/deploy.yml file that automatically builds the plugin JAR and deploys it to the omcsi (open-mc-server-infrastructure) instance when changes are pushed to the deploy branch.
Implementation
Create .github/workflows/deploy.yml modeled after the Activity Tracker reference workflow with the following adjustments for this project:
- JDK version:
[8 / 11 / 17 / 21]
- Build tool & command:
- Maven:
mvn --batch-mode package
- Gradle:
./gradlew build
- JAR location:
- Maven:
target/ (exclude original-*, *-sources.jar, *-javadoc.jar)
- Gradle:
build/libs/ (exclude *-sources.jar, *-javadoc.jar)
Required Secrets
Add via repo Settings → Secrets and variables → Actions:
| Secret |
Value |
OMCSI_DEPLOY_URL |
Base URL of the omcsi instance, e.g. https://mc.example.com:8092 |
OMCSI_DEPLOY_TOKEN |
Value of DEPLOY_AUTH_TOKEN from the omcsi .env file |
Required Variables
Add via repo Settings → Secrets and variables → Actions → Variables:
| Variable |
Value |
PLUGIN_JAR_NAME |
Filename of the JAR on the server, e.g. MyPlugin.jar |
DEPLOY_BRANCH |
Branch that triggers deploys (default: main) |
Acceptance Criteria
Reference
Summary
Add a
.github/workflows/deploy.ymlfile that automatically builds the plugin JAR and deploys it to the omcsi (open-mc-server-infrastructure) instance when changes are pushed to the deploy branch.Implementation
Create
.github/workflows/deploy.ymlmodeled after the Activity Tracker reference workflow with the following adjustments for this project:[8 / 11 / 17 / 21]mvn --batch-mode package./gradlew buildtarget/(excludeoriginal-*,*-sources.jar,*-javadoc.jar)build/libs/(exclude*-sources.jar,*-javadoc.jar)Required Secrets
Add via repo Settings → Secrets and variables → Actions:
OMCSI_DEPLOY_URLhttps://mc.example.com:8092OMCSI_DEPLOY_TOKENDEPLOY_AUTH_TOKENfrom the omcsi.envfileRequired Variables
Add via repo Settings → Secrets and variables → Actions → Variables:
PLUGIN_JAR_NAMEMyPlugin.jarDEPLOY_BRANCHmain)Acceptance Criteria
.github/workflows/deploy.ymlexists in the repoworkflow_dispatch)Reference
.github/workflows/deploy.yml