diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml
new file mode 100644
index 0000000..c3569a2
--- /dev/null
+++ b/.github/workflows/update-docs.yml
@@ -0,0 +1,51 @@
+name: Update HTML documentation
+
+on:
+ push:
+ paths:
+ - 'man/**'
+ workflow_dispatch:
+
+permissions:
+ contents: read
+
+jobs:
+ docs:
+ permissions:
+ contents: write
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v7
+
+ - name: Install groff
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y groff
+
+ - name: Generate HTML from man pages
+ run: |
+ mkdir -p doc/html/man5 doc/html/man8
+ echo \\
3proxy documentation\\\3proxy documentation\
>doc/html/index.html
+ echo \Security recommendations\\
>>doc/html/index.html
+ echo \Optimizing 3proxy for high loads\\
>>doc/html/index.html
+ echo \How To \(English, very incomplete\)\\
>>doc/html/index.html
+ echo \How To \(Russian\)\\
>>doc/html/index.html
+ echo \Developer reference\\
>>doc/html/index.html
+ echo \Man pages:\
>>doc/html/index.html
+ cd man
+ for i in *.8; do ((bash -c "groff -mandoc -Thtml $i | grep -v DOCTYPE| grep -v text/css| grep -v 'meta ' | grep -v /style | grep -v { | grep -v /title | grep -v www.w3.org | grep -v CreationDate" > ../doc/html/man8/$i.html ) && echo \
\$i\ >> ../doc/html/index.html); done
+ for i in *.5; do ((bash -c "groff -mandoc -Thtml $i | grep -v DOCTYPE| grep -v text/css| grep -v 'meta ' | grep -v /style | grep -v { | grep -v /title | grep -v www.w3.org | grep -v CreationDate" > ../doc/html/man5/$i.html ) && echo \
\$i\ >> ../doc/html/index.html); done
+ cd ..
+ echo \\ >>doc/html/index.html
+
+ - name: Commit
+ run: |
+ if [ -z "$(git status --porcelain doc/html)" ]; then
+ echo "documentation already up to date"
+ exit 0
+ fi
+ git config user.name "github-actions[bot]"
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
+ git add doc/html
+ git commit -m "Update HTML documentation from man pages"
+ git push