Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/build_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: build_deploy

on:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
working-directory: docs

- name: Setup Pages
id: pages
uses: actions/configure-pages@v5

- name: Build with Jekyll
run: bundle exec jekyll build --verbose --trace --baseurl "${{ steps.pages.outputs.base_path || '' }}"
working-directory: docs
env:
JEKYLL_ENV: production

- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: docs/_site

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
54 changes: 54 additions & 0 deletions .github/workflows/links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: links

on:
push:
branches: [main]
pull_request:

permissions:
contents: read
pull-requests: write

jobs:
link_checker:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4

- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
working-directory: docs

- name: Build site
env:
JEKYLL_ENV: production
run: bundle exec jekyll build --trace
working-directory: docs

- name: Link Checker (Built Site)
uses: lycheeverse/lychee-action@v2
with:
args: >-
--verbose
--no-progress
--config docs/.lychee.toml
--root-dir "$(pwd)/docs/_site"
--base-url file://${{ github.workspace }}/docs/_site
'docs/_site/**/*.html'
fail: true

- name: Comment PR on failure
if: failure() && github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '❌ Link checking failed. Please check the workflow logs for details.'
})
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,14 @@ build/test-results/
# Project-specific
*.bak
CLAUDE.md
_site

# Internal planning docs (not for public repo)
MULTI_PACKET_RESPONSE_PLAN.md
PILAF_TEAM_PROPOSAL.md

# Docs
docs/_site/
docs/.lycheecache
docs/Gemfile.lock

95 changes: 95 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Contributing to Rcon

Thank you for your interest in contributing to Rcon! This document provides guidelines for contributing to the project.

## Getting Started

1. Fork the repository on GitHub
2. Clone your fork locally:
```bash
git clone https://github.com/YOUR_USERNAME/rcon.git
cd rcon
```
3. Add the upstream remote:
```bash
git remote add upstream https://github.com/cavarest/rcon.git
```

## Development

### Building

```bash
./gradlew build
```

### Running Tests

```bash
# Unit tests only (fast, no Docker)
./gradlew test

# Integration tests (requires Docker daemon)
./gradlew integrationTest

# All tests
./gradlew test integrationTest
```

**Note**: Integration tests run against a real Minecraft Paper server using Docker. They can take 10+ minutes due to container overhead.

### Skip Integration Tests Locally

```bash
SKIP_INTEGRATION_TESTS=true ./gradlew test
```

## Code Style

- Follow existing code style and conventions
- Use meaningful variable and method names
- Add Javadoc to public APIs
- Keep methods focused and concise

## Documentation

Documentation is in the `docs/` directory using Jekyll and AsciiDoc:

```bash
cd docs
bundle install
bundle exec jekyll serve
```

Visit http://localhost:4000 to preview changes.

## Commit Messages

Use semantic commit messages:

```
<type>(<scope>): <subject>
```

Types: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore`

Example: `fix(auth): resolve login bug`

## Pull Requests

1. Create a feature branch from `main`
2. Make your changes with clear commit messages
3. Ensure tests pass
4. Push to your fork and create a pull request

## Testing Your Changes

Before submitting a PR, please:

1. Run all tests: `./gradlew test integrationTest`
2. Build documentation: `cd docs && bundle exec jekyll build`
3. Check links: `cd docs && bundle exec lychee . --config .lychee.toml`

## Questions?

Feel free to open an issue for questions or discussion.
Loading