From 9dac278131c1a6ee484e071868e5a6a2b5d97f25 Mon Sep 17 00:00:00 2001 From: Matyrobbrt Date: Thu, 8 Aug 2024 20:24:44 +0300 Subject: [PATCH] [docs only] Document counters --- .github/workflows/publish_ghcr.yml | 3 ++- .github/workflows/publish_maven.yml | 1 + docs/docs/.vuepress/config.js | 4 ++++ docs/docs/modules/counters.md | 7 +++++++ docs/docs/modules/index.md | 2 +- 5 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 docs/docs/modules/counters.md diff --git a/.github/workflows/publish_ghcr.yml b/.github/workflows/publish_ghcr.yml index 13d9d03..495e429 100644 --- a/.github/workflows/publish_ghcr.yml +++ b/.github/workflows/publish_ghcr.yml @@ -8,6 +8,7 @@ on: jobs: push-image: + if: !contains(github.event.head_commit.message, '[docs only]') runs-on: ubuntu-latest steps: - name: 'Checkout GitHub Action' @@ -33,4 +34,4 @@ jobs: run: | docker build . --tag ghcr.io/neoforged/camelot:latest --tag ghcr.io/neoforged/camelot:${{ env.BOT_VERSION }} docker push ghcr.io/neoforged/camelot:latest - docker push ghcr.io/neoforged/camelot:${{ env.BOT_VERSION }} \ No newline at end of file + docker push ghcr.io/neoforged/camelot:${{ env.BOT_VERSION }} diff --git a/.github/workflows/publish_maven.yml b/.github/workflows/publish_maven.yml index e412424..0970612 100644 --- a/.github/workflows/publish_maven.yml +++ b/.github/workflows/publish_maven.yml @@ -8,6 +8,7 @@ on: jobs: publish: + if: !contains(github.event.head_commit.message, '[docs only]') runs-on: ubuntu-latest steps: - name: 'Checkout GitHub Action' diff --git a/docs/docs/.vuepress/config.js b/docs/docs/.vuepress/config.js index d23395a..3c95a5e 100644 --- a/docs/docs/.vuepress/config.js +++ b/docs/docs/.vuepress/config.js @@ -24,6 +24,10 @@ export default defineUserConfig({ { text: 'Moderation', link: '/modules/moderation' + }, + { + text: 'Counters', + link: '/modules/counters' } ] } diff --git a/docs/docs/modules/counters.md b/docs/docs/modules/counters.md new file mode 100644 index 0000000..1ef2804 --- /dev/null +++ b/docs/docs/modules/counters.md @@ -0,0 +1,7 @@ +# Counters Module +The counters module (id: `counters`, configuration class: `Counters`) provides users the ability to increment counters (integers) in chat: +- `++`: increments a counter by 1 +- `--`: decrements a counter by 1 +- `==`: gets a counter's value + +For instance, `derps++` increments the value of the `derps` counter by 1. diff --git a/docs/docs/modules/index.md b/docs/docs/modules/index.md index 800c49c..96480bc 100644 --- a/docs/docs/modules/index.md +++ b/docs/docs/modules/index.md @@ -3,7 +3,7 @@ Camelot features are grouped in modules that can be enabled and configured separately. By default, the following modules are enabled: -- Counters +- [Counters](./counters) - Custom Pings - File Preview (must have a PAT configured to work) - Info Channels (must have a PAT configured to work)