fix: переход на jt4d-wiki.ru.net

This commit is contained in:
2026-06-15 09:32:28 +03:00
parent c727ed2f83
commit d8b957377c
3 changed files with 9 additions and 7 deletions
+7 -4
View File
@@ -20,13 +20,15 @@ runs:
ORG="${{ github.repository_owner }}" ORG="${{ github.repository_owner }}"
if [[ "$REF" == "main" || "$REF" == "master" ]]; then if [[ "$REF" == "main" || "$REF" == "master" ]]; then
URL="http://${REPO}.${ORG}.docs.jt4d.ru.net" URL="http://${REPO}.${ORG}.jt4d-wiki.ru.net"
S3_PATH="${ORG}.${REPO}"
else else
URL="http://${REF}.${REPO}.${ORG}.docs.jt4d.ru.net" URL="http://${REF}.${REPO}.${ORG}.jt4d-wiki.ru.net"
S3_PATH="${ORG}.${REPO}.${REF}"
fi fi
echo "TARGET_URL=$URL" >> $GITHUB_ENV echo "TARGET_URL=$URL" >> $GITHUB_ENV
echo "S3_PATH=${ORG}.${REPO}.${REF}" >> $GITHUB_ENV echo "S3_PATH=$S3_PATH" >> $GITHUB_ENV
- name: Set docs status pending - name: Set docs status pending
shell: bash shell: bash
@@ -65,6 +67,7 @@ runs:
working-directory: ${{ github.action_path }}/docusaurus working-directory: ${{ github.action_path }}/docusaurus
env: env:
DOCUSERVIX_ON_BROKEN_LINKS: ${{ inputs.on-broken-links }} DOCUSERVIX_ON_BROKEN_LINKS: ${{ inputs.on-broken-links }}
DOCUSERVIX_URL: ${{ env.TARGET_URL }}
run: yarn docusaurus build --out-dir ${{ github.workspace }}/generated-docs run: yarn docusaurus build --out-dir ${{ github.workspace }}/generated-docs
- name: Upload to S3 - name: Upload to S3
@@ -74,7 +77,7 @@ runs:
AWS_SECRET_ACCESS_KEY: ${{ vars.DOCUSERVIX_S3_SECRET }} AWS_SECRET_ACCESS_KEY: ${{ vars.DOCUSERVIX_S3_SECRET }}
run: | run: |
aws s3 sync generated-docs/ \ aws s3 sync generated-docs/ \
s3://${{ vars.DOCUSERVIX_S3_BUCKET }}/docs.${{ env.S3_PATH }}\ s3://${{ vars.DOCUSERVIX_S3_BUCKET }}/${{ env.S3_PATH }}\
--endpoint-url ${{ vars.DOCUSERVIX_S3_URL }} \ --endpoint-url ${{ vars.DOCUSERVIX_S3_URL }} \
--acl public-read \ --acl public-read \
--delete --delete
-1
View File
@@ -1,5 +1,4 @@
title: "Title example" title: "Title example"
url: "https://example.docs.jt4d.ru"
project: project:
org: "example" org: "example"
repo: "example" repo: "example"
+2 -2
View File
@@ -7,7 +7,6 @@ import type {NavbarItem} from '@docusaurus/theme-common'
interface DocsConfig { interface DocsConfig {
title: string; title: string;
url: string;
project: { org: string; repo: string }; project: { org: string; repo: string };
dirs?: { docs?: string; blog?: string }; dirs?: { docs?: string; blog?: string };
} }
@@ -16,9 +15,10 @@ const docsConfig = yaml.load(fs.readFileSync('./.docuservix.yml', 'utf8')) as Do
const { const {
title, title,
url,
} = docsConfig } = docsConfig
const url = process.env.DOCUSERVIX_URL;
const { const {
org, org,
repo repo