summaryrefslogtreecommitdiff
diff options
from:
to:
context:
space:
mode:
authorGravatar Saya Andy <145215889+SayaAndy@users.noreply.github.com> 2026-05-03 00:23:12 +0700
committerGravatar GitHub <noreply@github.com> 2026-05-03 00:23:12 +0700
commit82353c59737d173776822d8e4255802bf7ac5685 (patch)
treec5b763d5db76920845e89b6c6e5eb8de5554136e
parentd8de4ede8c6a0cc02b9c8c30d68155b1f838254c (diff)
parent3483fdac0c40df7e390a941431b9e99f5a6de687 (diff)
downloadweb-0.14.1.tar.gz
web-0.14.1.zip
v0.14.1 (#28)v0.14.1
* [feat: add yandex verification code](https://github.com/SayaAndy/saya-today-web/commit/3483fdac0c40df7e390a941431b9e99f5a6de687)
-rw-r--r--.github/workflows/build-and-deploy-prod.yml2
-rw-r--r--config/config.go1
-rw-r--r--config/config.prod.yaml1
-rw-r--r--deploy/playbook.yml1
-rw-r--r--internal/router/handlers/root.go3
5 files changed, 7 insertions, 1 deletions
diff --git a/.github/workflows/build-and-deploy-prod.yml b/.github/workflows/build-and-deploy-prod.yml
index 381d656..97afdf7 100644
--- a/.github/workflows/build-and-deploy-prod.yml
+++ b/.github/workflows/build-and-deploy-prod.yml
@@ -80,4 +80,4 @@ jobs:
ANSIBLE_HOST_KEY_CHECKING: False
working-directory: ./deploy
run: |
- ansible-playbook -i inventory.yml -l prod playbook.yml --private-key ~/.ssh/id_ed25519 -u svc_github -e saya_today_web_auth_salt="${{ secrets.AUTH_SALT }}" -e saya_today_web_s3_access_key_id="${{ secrets.S3_ACCESS_KEY_ID }}" -e saya_today_web_s3_secret_access_key="${{ secrets.S3_SECRET_ACCESS_KEY }}" -e saya_today_web_environment=prod -e saya_today_web_tag=${{ github.ref_name }} -e saya_today_web_mail_salt="${{ secrets.MAIL_SALT }}" -e saya_today_web_mail_host="${{ secrets.MAIL_HOST }}" -e saya_today_web_mail_address="${{ secrets.MAIL_ADDRESS }}" -e saya_today_web_mail_username="${{ secrets.MAIL_USERNAME }}" -e saya_today_web_mail_password="${{ secrets.MAIL_PASSWORD }}" -e saya_today_google_site_verification="${{ secrets.GOOGLE_SITE_VERIFICATION }}"
+ ansible-playbook -i inventory.yml -l prod playbook.yml --private-key ~/.ssh/id_ed25519 -u svc_github -e saya_today_web_auth_salt="${{ secrets.AUTH_SALT }}" -e saya_today_web_s3_access_key_id="${{ secrets.S3_ACCESS_KEY_ID }}" -e saya_today_web_s3_secret_access_key="${{ secrets.S3_SECRET_ACCESS_KEY }}" -e saya_today_web_environment=prod -e saya_today_web_tag=${{ github.ref_name }} -e saya_today_web_mail_salt="${{ secrets.MAIL_SALT }}" -e saya_today_web_mail_host="${{ secrets.MAIL_HOST }}" -e saya_today_web_mail_address="${{ secrets.MAIL_ADDRESS }}" -e saya_today_web_mail_username="${{ secrets.MAIL_USERNAME }}" -e saya_today_web_mail_password="${{ secrets.MAIL_PASSWORD }}" -e saya_today_google_site_verification="${{ secrets.GOOGLE_SITE_VERIFICATION }}" -e saya_today_yandex_verification="${{ secrets.YANDEX_VERIFICATION }}"
diff --git a/config/config.go b/config/config.go
index 784ac38..0b1570a 100644
--- a/config/config.go
+++ b/config/config.go
@@ -238,6 +238,7 @@ type TriggerConfig struct {
type MetaConfig struct {
GoogleSiteVerification string `json:"GoogleSiteVerification" yaml:"googleSiteVerification"`
+ YandexVerification string `json:"YandexVerification" yaml:"yandexVerification"`
}
type PhotoStorageConfig struct {
diff --git a/config/config.prod.yaml b/config/config.prod.yaml
index 779550a..e5785f8 100644
--- a/config/config.prod.yaml
+++ b/config/config.prod.yaml
@@ -56,6 +56,7 @@ mail:
canonicalEndpoint: "https://${FQDN}"
meta:
googleSiteVerification: "${GOOGLE_SITE_VERIFICATION}"
+ yandexVerification: "${YANDEX_VERIFICATION}"
photoStorage:
full:
baseUrl: https://storage.yandexcloud.kz/sayauz-photos/%s
diff --git a/deploy/playbook.yml b/deploy/playbook.yml
index b73146a..ae3e936 100644
--- a/deploy/playbook.yml
+++ b/deploy/playbook.yml
@@ -43,6 +43,7 @@
MAIL_SALT: "{{ saya_today_web_mail_salt }}"
FQDN: "{{ saya_today_web_listen_address }}"
GOOGLE_SITE_VERIFICATION: "{{ saya_today_google_site_verification | default('') }}"
+ YANDEX_VERIFICATION: "{{ saya_today_yandex_verification | default('') }}"
network_mode: caddy
networks:
- name: caddy
diff --git a/internal/router/handlers/root.go b/internal/router/handlers/root.go
index a8890fa..6a011e4 100644
--- a/internal/router/handlers/root.go
+++ b/internal/router/handlers/root.go
@@ -50,6 +50,9 @@ func (r *RootHandler) AddMeta(c *fiber.Ctx, supplements *router.Supplements, lan
if supplements.Meta.GoogleSiteVerification != "" {
meta = append(meta, router.MetaField{Name: "google-site-verification", Content: supplements.Meta.GoogleSiteVerification})
}
+ if supplements.Meta.YandexVerification != "" {
+ meta = append(meta, router.MetaField{Name: "yandex-verification", Content: supplements.Meta.YandexVerification})
+ }
return meta, nil
}