Skip to content

Commit

Permalink
docs(*): Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
julienloizelet committed Jun 27, 2024
1 parent 92fdf9f commit 177103d
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 15 deletions.
21 changes: 9 additions & 12 deletions .github/workflows/markdown.yml → .github/workflows/doc-links.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
name: Documentation links

on:
push:
branches: [ main ]
workflow_dispatch:

permissions:
contents: read

name: Markdown files test and update
jobs:
markdown-test-and-update:
name: Markdown files test and update
markdown-test:
name: Markdown files test
runs-on: ubuntu-latest
steps:

- name: Clone sources
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: extension

Expand All @@ -31,11 +36,3 @@ jobs:
awesome_bot --files README.md --allow-dupe --allow 401 --skip-save-results --white-list ddev.site --base-url http://localhost:8080/
awesome_bot docs/*.md --skip-save-results --allow-dupe --allow 401 --white-list ddev.site,https://crowdsec,php.net/supported-versions.php --base-url http://localhost:8080/docs/
- name: Generate table of contents
uses: technote-space/toc-generator@v4
with:
MAX_HEADER_LEVEL: 5
COMMIT_NAME: CrowdSec Dev Bot
TARGET_PATHS: 'docs/*.md'
CHECK_ONLY_DEFAULT_BRANCH: true
CREATE_PR: true
2 changes: 1 addition & 1 deletion .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
ddev get julienloizelet/ddev-playwright
- name: Start DDEV
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 3
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

> The official standalone PHP bouncer for the CrowdSec LAPI
![project is maintained](https://img.shields.io/maintenance/yes/2023.svg)
![Version](https://img.shields.io/github/v/release/crowdsecurity/cs-standalone-php-bouncer?include_prereleases)
![project is maintained](https://img.shields.io/maintenance/yes/2023.svg)
[![Test suite](https://github.com/crowdsecurity/cs-standalone-php-bouncer/actions/workflows/test-suite.yml/badge.svg)](https://github.com/crowdsecurity/cs-standalone-php-bouncer/actions/workflows/test-suite.yml)
[![Coding standards](https://github.com/crowdsecurity/cs-standalone-php-bouncer/actions/workflows/coding-standards.yml/badge.svg)](https://github.com/crowdsecurity/cs-standalone-php-bouncer/actions/workflows/coding-standards.yml)
![Licence](https://img.shields.io/github/license/crowdsecurity/cs-standalone-php-bouncer)
Expand Down
19 changes: 19 additions & 0 deletions docs/DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
- [Create a bouncer](#create-a-bouncer)
- [Create a watcher](#create-a-watcher)
- [Use the web container to call LAPI](#use-the-web-container-to-call-lapi)
- [Update documentation table of contents](#update-documentation-table-of-contents)
- [Commit message](#commit-message)
- [Allowed message `type` values](#allowed-message-type-values)
- [Release process](#release-process)
Expand Down Expand Up @@ -599,6 +600,24 @@ curl -H "X-Api-Key: <YOUR_BOUNCER_KEY>" https://crowdsec:8080/v1/decisions/strea
curl -H "X-Api-Key: <YOUR_BOUNCER_KEY>" https://crowdsec:8080/v1/decisions/stream | jq
```


## Update documentation table of contents

To update the table of contents in the documentation, you can use [the `doctoc` tool](https://github.com/thlorenz/doctoc).

First, install it:

```bash
npm install -g doctoc
```

Then, run it in the documentation folder:

```bash
doctoc docs/*
```


## Commit message

In order to have an explicit commit history, we are using some commits message convention with the following format:
Expand Down
3 changes: 3 additions & 0 deletions docs/INSTALLATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
- [Files permission](#files-permission)
- [Settings file](#settings-file)
- [`auto_prepend_file` directive](#auto_prepend_file-directive)
- [`.ini` file](#ini-file)
- [Nginx](#nginx)
- [Apache](#apache)
- [Stream mode cron task](#stream-mode-cron-task)
- [Cache pruning cron task](#cache-pruning-cron-task)
- [Upgrade](#upgrade)
Expand Down

0 comments on commit 177103d

Please sign in to comment.