add docs build hook

This commit is contained in:
simon 2023-03-22 15:54:12 +07:00
parent 52b893f4fa
commit 6bfa43c1f2
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
3 changed files with 23 additions and 0 deletions

View File

@ -60,6 +60,18 @@ services:
- "8080" - "8080"
networks: networks:
- tubearchivist_network - 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 # backend postgres
postgres: postgres:
image: postgres:14 image: postgres:14

View File

@ -38,6 +38,13 @@ class WebhookBase:
"gh_user": "tubearchivist", "gh_user": "tubearchivist",
"gh_repo": "browser-extension", "gh_repo": "browser-extension",
"discord_release_hook": environ.get("GITHUB_RELEASE_HOOK_URL"), "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") ROADMAP_HOOK_URL = environ.get("ROADMAP_HOOK_URL")

View File

@ -74,6 +74,10 @@ class GithubHook(WebhookBase):
print("commit not on master") print("commit not on master")
return return
if self.repo == "docs":
TaskHandler(self.repo_conf).create_task("rebuild")
return
self._check_readme() self._check_readme()
build_message = self.check_commit_message() build_message = self.check_commit_message()