Skip to main content

No project description provided

Project description

mkdocs-build-webhook

A webhook that builds your mkdocs projects.

Run it with

Installation

mkdir -p /var/share/mkdocs-build-webhook/ /var/www/ /etc/mkdocs-build-webhook/ /var/www/.ssh/
ssh-keyscan github.com >> /var/www/.ssh/known_hosts
ssh-keygen -t ed25519 -f /var/www/.ssh/deploy_key -C "mkdocs-build-webhook" -N ''
chown -R www-data:www-data /var/share/mkdocs-build-webhook/ /var/www/

Add this config to /etc/mkdocs-build-webhook/mkdocs-build-webhook.conf:

[paths]
git = "/var/share/mkdocs-build-webhook/"
www = "/var/www/"

[auth]
secret = "<secret>"

[gunicorn]
bind = "0.0.0.0:5000"
workers = 4

/var/www/.ssh/config:

Host github.com
 HostName github.com
 Port 22
 User git
 CheckHostIP no
 IdentityFile "~/.ssh/deploy_key"

Install pipx:

apt install pipx
su www-data -s /bin/bash
pipx install mkdocs-build-webhook

/etc/systemd/system/mkdocs-build-webhook.service:

[Unit]
Description=mkdocs-build-webhook Service
After=network.target

[Service]
Type=simple
ExecStart=/var/www/.local/pipx/venvs/mkdocs-build-webhook/bin/mkdocs-build-webhook
User=www-data
Group=www-data
Restart=always
RestartSec=3

[Install]
WantedBy=multi-user.target

Activate with:

sudo systemctl daemon-reload
sudo systemctl enable mkdocs-build-webhook.service
sudo systemctl start mkdocs-build-webhook.service

Does it work?

sudo journalctl -u mkdocs-build-webhook.service -f

Docker

podman build -t mkdocs-build-webhook .    
podman run  --userns keep-id --rm --name mkdocs-build-webhook -v ./dist/www/:/var/www/:z -e WEBHOOK_SECRET=secret -p 5000:5000 localhost/mkdocs-build-webhook

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mkdocs_build_webhook-0.1.14.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

mkdocs_build_webhook-0.1.14-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_build_webhook-0.1.14.tar.gz.

File metadata

  • Download URL: mkdocs_build_webhook-0.1.14.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Linux/6.6.14-200.fc39.x86_64

File hashes

Hashes for mkdocs_build_webhook-0.1.14.tar.gz
Algorithm Hash digest
SHA256 03cbf02f699aafaa4c7ef2036002a5108a68cf60c5fe621b0b63ee13547936e9
MD5 a3a38c3e47fd3ac86be4fd359cba1bf1
BLAKE2b-256 e829389c2a04e8a2e2416cf01ee7fc7c9b04698cec8433942292aa26e3098708

See more details on using hashes here.

File details

Details for the file mkdocs_build_webhook-0.1.14-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_build_webhook-0.1.14-py3-none-any.whl
Algorithm Hash digest
SHA256 2a85d4906a2b4608149f71f3ada0c27800cd50cbbc037d0d0ad0c1e500237ef6
MD5 0eb23a35f27999fdba9ec0fff5a6fa23
BLAKE2b-256 63e217fdc29a0ecbd4f9b096234e4a96cf684515c6c9684755276a9650d716b2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page