Automatically deploy and update the server using Github Actions.
- Install JDK 21.
- Download the latest version from the releases.
- Create a
application-prod.yml
file in the same directory as the jar file.
server:
port: 8346 # Port
daemonJar:
url: https://github.com/xuanzhi33/daemon.jar/releases/download/v0.2.0/daemonjar-0.2.0.jar # URL to download your server program
name: daemonjar-0.2.0.jar # Name of it
token: your_token # Update Token
- Run the jar file.
java -jar daemonjar-x.x.x.jar
- Using the following command to update your server.
curl "https://your-ip:port/update?token=your_token"
- It will download the latest version of the server program and restart it.