A template to quickly start new Java projects.
- A minimal
pom.xml
- Environment: Java 17
- Compile dependencies: SLF4J
- Test dependencies: Junit Jupiter, AssertJ, Log4j2 binding for SLF4J
- A
build.yml
file with a basic Github Action configuration to compile your code and upload coverage results to CodeCov - A
nginx.conf
file to quickly get started with your nginx configuration if you want to upload resources related to your project
- Edit
pom.xml
and set theartifactId
andname
. - Configure your repository in CodeCov: you probably need to enable it, and copy the upload token
- Create a new repository secret:
CODECOV_TOKEN
and set its value with your upload token - Write some code (and some tests!) and push your work
At this point the Github Action should compile and test your code, and you should be able to see your coverage data in CodeCov.
- Create a new
A
DNS record pointing to your server - Edit
nginx.conf
and replaceserver_name
with the name you specified in your DNS configuration - Create a directory in
/var/www/html
to store your static content, and editnginx.conf
'sroot
to point to this new directory - Upload
nginx.conf
to your server (/etc/nginx/sites-available
) and give it an appropriate name. Then enable the site with the following command:ln -s /etc/nginx/sites-available/my-app.conf /etc/nginx/sites-enabled/
. - (Recommended) Run certbot to get HTTPS certificates for your subdomain
- Create the following repository secrets
CD_HOST
: the host for your resources (e.g.myvsp.ovh.net
)CD_USERNAME
: the user to log as in your server (e.g.bob
)CD_PASSWORD
: the password of the user you specified
- Uncomment the steps
Generate Javadoc
andUpload Javadoc
in.github/workflow/build.yml
- Set the
remote
path to point to the directory you created in 3
- Set the
- (Optional) Delete
nginx.conf
from your app directory, you don't need it anymore, it is on your server now