Skip to content

Commit

Permalink
Add mdbook and GitHub pages deployment (#319)
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Mandel <[email protected]>
  • Loading branch information
XAMPPRocky and markmandel authored Aug 10, 2021
1 parent 4d0bd0d commit c187b5a
Show file tree
Hide file tree
Showing 25 changed files with 86 additions and 25 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Deploy docs
on:
push:
branches:
- main
- pr/** # just for testing
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- run: echo snapshot=$(echo ${{ github.ref }} | sed -E 's|refs/[^/]+/||') >> $GITHUB_ENV
- run: echo docs_dir=docs-build/${{ env.snapshot }} >> $GITHUB_ENV
- run: echo documentation directory=${{ env.docs_dir }}
- run: brew install mdbook
- run: mkdir -p ${{ env.docs_dir }}
- run: $(cd docs && mdbook build -d ../${{ env.docs_dir }}/book)
- run: cargo doc --workspace --no-deps
- run: mv target/doc ${{ env.docs_dir }}/api
- uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: docs-build
CLEAN: false
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ dependencies-src.zip
quilkin-*.zip

/quilkin.yaml
/docs/book

### Rust template
# Generated by Cargo
Expand Down
7 changes: 7 additions & 0 deletions docs/book.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[book]
language = "en"
multilingual = false
src = "src"
title = "Quilkin Book"

[output.html]
22 changes: 22 additions & 0 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Summary

- [Introduction](./introduction.md)
- [Quickstart]()
- [Netcat](./quickstart-netcat.md)
- [Agones + Xonotic](./quickstart-agones-xonotic.md)
- [Usage](./using.md)
- [Session](./session.md)
- [Proxy](./proxy.md)
- [Proxy Configuration](./proxy-configuration.md)
- [Filters](./filters.md)
- [Capture Bytes](./filters/capture_bytes.md)
- [Compress](./filters/compress.md)
- [Debug](./filters/debug.md)
- [Load Balancer](./filters/load_balancer.md)
- [Local Rate Limit](./filters/local_rate_limit.md)
- [Token Router](./filters/token_router.md)
- [Writing Custom Filters](./filters/writing_custom_filters.md)
- [Integrations](./integrations.md)
- [Administration](./admin.md)
- [FAQ](./FAQ.md)
- [xDS](./xds.md)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Writing Custom Filters

Quilkin provides an extensible implementation of [Filters] that allows us to plug in custom implementations to fit our needs.
This document provides an overview of the API and how we can go about writing our own [Filters].

Expand Down
10 changes: 5 additions & 5 deletions docs/integrations.md → docs/src/integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on how you can use Quilkin in your multiplayer game networking architecture.

## Server Proxy as a Sidecar

```
```text
+
|
Internet
Expand Down Expand Up @@ -49,7 +49,7 @@ and metric information that comes with Quilkin.

## Client Proxy to Sidecar Server Proxy

```
```text
+
|
Internet
Expand Down Expand Up @@ -85,7 +85,7 @@ advantage of Client Proxy functionality.

## Client Proxy to Separate Server Proxies Pools

```
```text
+ +
| |
Internet Private
Expand Down Expand Up @@ -134,9 +134,9 @@ while also providing the most redundancy and security for your dedicated game se

## What Next?

* Have a look at the [example configurations](../examples) for basic configuration examples.
* Have a look at the [example configurations](https://github.com/googleforgames/quilkin/blob/main/examples) for basic configuration examples.
* Review the [set of filters](./extensions/filters/filters.md) that are available.

---

Diagrams powered by http://asciiflow.com/
Diagrams powered by http://asciiflow.com/
6 changes: 3 additions & 3 deletions docs/README.md → docs/src/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ It is designed to be used behind game clients as well as in front of dedicated g

Quilkin's aim is to pull the above functionality out of bespoke, monolithic dedicated game servers and clients, and
provide standard, composable modules that can be reused across a wide set of multiplayer games, so that game
developers can instead focus on their game specific aspects of building a multiplayer game.
developers can instead focus on their game specific aspects of building a multiplayer game.

## Why use Quilkin?

Expand All @@ -33,12 +33,12 @@ Quilkin incorporates these abilities:
* Non-transparent proxying of UDP data, the internal state of your game architecture is not visible to bad actors.
* Out of the box metrics for UDP packet information.
* Composable tools for access control and security.
* Able to be utilised as a standalone binary, with no client/server changes required or as a Rust library
* Able to be utilised as a standalone binary, with no client/server changes required or as a Rust library
depending on how deep an integration you wish for your system.
* Can be integrated with C/C++ code bases via FFI.

## What Next?

* Read the [usage guide](./using.md)
* Have a look at the [example configurations](../examples) for basic configuration examples.
* Have a look at the [example configurations](https://github.com/googleforgames/quilkin/blob/main/examples) for basic configuration examples.
* Check out the [example integration patterns](./integrations.md).
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,5 @@ definitions:
- address
```
[examples]: ../examples
[examples]: https://github.com/googleforgames/quilkin/blob/main/examples
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Let's take a look at some metrics that Quilkin outputs.
Grab the name of the GameServer you connected to before, and replace the `${gameserver}` value below, and run the
command. This will forward the [admin](./admin.md) interface to localhost.

```
```shell
kubectl port-forward ${gameserver} 9091
```

Expand Down Expand Up @@ -132,5 +132,5 @@ kubectl delete -f https://raw.githubusercontent.com/googleforgames/quilkin/main/

## What's Next?

* Have a look at the [examples](./examples) folder for configuration and usage examples.
* Explore the [proxy configuration reference](./docs/proxy-configuration.md) for other configuration options.
* Have a look at the [examples](https://github.com/googleforgames/quilkin/blob/main/examples) folder for configuration and usage examples.
* Explore the [proxy configuration reference](./docs/proxy-configuration.md) for other configuration options.
8 changes: 4 additions & 4 deletions docs/quickstart-netcat.md → docs/src/quickstart-netcat.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Requirements

* A *nix terminal
* A \*nix terminal
* A binary release of Quilkin from the [Github releases page](https://github.com/googleforgames/quilkin/releases)
* [ncat](https://nmap.org/ncat/guide/)
* [netcat](http://netcat.sourceforge.net/)
Expand Down Expand Up @@ -32,7 +32,7 @@ static:
- address: 127.0.0.1:8000
```
This configuration will start Quilkin on the default port of 7000, and it will redirect all incoming UDP traffic to
This configuration will start Quilkin on the default port of 7000, and it will redirect all incoming UDP traffic to
a single endpoint of 127.0.0.1, port 8000.
Let's start Quilkin with the above configuration:
Expand Down Expand Up @@ -75,6 +75,6 @@ Congratulations! You have successfully routed a UDP packet and back again with Q
What's next?

* Run through the [Quilkin with Agones quickstart](./quickstart-agones-xonotic.md).
* Have a look at some of [the examples](../examples) we have.
* Check out the [proxy configuration reference](./proxy-configuration.md) to what other configuration options are
* Have a look at some of [the examples](https://github.com/googleforgames/quilkin/blob/main/examples) we have.
* Check out the [proxy configuration reference](./proxy-configuration.md) to what other configuration options are
available.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 9 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ pub use quilkin_macros::include_proto;

#[cfg(doctest)]
mod external_doc_tests {
#![doc = include_str!("../docs/extensions/filters/filters.md")]
#![doc = include_str!("../docs/extensions/filters/writing_custom_filters.md")]
#![doc = include_str!("../docs/extensions/filters/load_balancer.md")]
#![doc = include_str!("../docs/extensions/filters/local_rate_limit.md")]
#![doc = include_str!("../docs/extensions/filters/debug.md")]
#![doc = include_str!("../docs/extensions/filters/concatenate_bytes.md")]
#![doc = include_str!("../docs/extensions/filters/capture_bytes.md")]
#![doc = include_str!("../docs/extensions/filters/token_router.md")]
#![doc = include_str!("../docs/extensions/filters/compress.md")]
#![doc = include_str!("../docs/src/filters.md")]
#![doc = include_str!("../docs/src/filters/writing_custom_filters.md")]
#![doc = include_str!("../docs/src/filters/load_balancer.md")]
#![doc = include_str!("../docs/src/filters/local_rate_limit.md")]
#![doc = include_str!("../docs/src/filters/debug.md")]
#![doc = include_str!("../docs/src/filters/concatenate_bytes.md")]
#![doc = include_str!("../docs/src/filters/capture_bytes.md")]
#![doc = include_str!("../docs/src/filters/token_router.md")]
#![doc = include_str!("../docs/src/filters/compress.md")]
}

0 comments on commit c187b5a

Please sign in to comment.