diff --git a/docker-compose_production.yml b/docker-compose_production.yml index 6dad8e5..a2af492 100644 --- a/docker-compose_production.yml +++ b/docker-compose_production.yml @@ -60,6 +60,18 @@ services: - "8080" networks: - tubearchivist_network + docs: + build: https://github.com/tubearchivist/docs.git + container_name: docs + restart: always + expose: + - "8081" + environment: + - NGINX_PORT=8081 + - VIRTUAL_HOST=docs.tubearchivist.com + - LETSENCRYPT_HOST=docs.tubearchivist.com + networks: + - tubearchivist_network # backend postgres postgres: image: postgres:14 diff --git a/tubearchivist/web/src/webhook_base.py b/tubearchivist/web/src/webhook_base.py index ad39573..7dcbf25 100644 --- a/tubearchivist/web/src/webhook_base.py +++ b/tubearchivist/web/src/webhook_base.py @@ -38,6 +38,13 @@ class WebhookBase: "gh_user": "tubearchivist", "gh_repo": "browser-extension", "discord_release_hook": environ.get("GITHUB_RELEASE_HOOK_URL"), + }, + "docs": { + "gh_user": "tubearchivist", + "gh_repo": "docs", + "rebuild": [ + ["docker", "compose", "-f", "../docker/docker-compose.yml", "up", "-d", "--build", "docs"] + ] } } ROADMAP_HOOK_URL = environ.get("ROADMAP_HOOK_URL") diff --git a/tubearchivist/web/src/webhook_github.py b/tubearchivist/web/src/webhook_github.py index dd2d82b..990ee43 100644 --- a/tubearchivist/web/src/webhook_github.py +++ b/tubearchivist/web/src/webhook_github.py @@ -74,6 +74,10 @@ class GithubHook(WebhookBase): print("commit not on master") return + if self.repo == "docs": + TaskHandler(self.repo_conf).create_task("rebuild") + return + self._check_readme() build_message = self.check_commit_message()