diff --git a/action.yml b/action.yml index c0b8f6d..b200a0e 100644 --- a/action.yml +++ b/action.yml @@ -20,13 +20,15 @@ runs: ORG="${{ github.repository_owner }}" 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 - URL="http://${REF}.${REPO}.${ORG}.docs.jt4d.ru.net" + URL="http://${REF}.${REPO}.${ORG}.jt4d-wiki.ru.net" + S3_PATH="${ORG}.${REPO}.${REF}" fi 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 shell: bash @@ -65,6 +67,7 @@ runs: working-directory: ${{ github.action_path }}/docusaurus env: DOCUSERVIX_ON_BROKEN_LINKS: ${{ inputs.on-broken-links }} + DOCUSERVIX_URL: ${{ env.TARGET_URL }} run: yarn docusaurus build --out-dir ${{ github.workspace }}/generated-docs - name: Upload to S3 diff --git a/docusaurus/.docuservix.yml b/docusaurus/.docuservix.yml index ec63b53..686e6e2 100644 --- a/docusaurus/.docuservix.yml +++ b/docusaurus/.docuservix.yml @@ -1,5 +1,4 @@ title: "Title example" -url: "https://example.docs.jt4d.ru" project: org: "example" repo: "example" diff --git a/docusaurus/docusaurus.config.ts b/docusaurus/docusaurus.config.ts index be6b605..d8a76c9 100644 --- a/docusaurus/docusaurus.config.ts +++ b/docusaurus/docusaurus.config.ts @@ -7,7 +7,6 @@ import type {NavbarItem} from '@docusaurus/theme-common' interface DocsConfig { title: string; - url: string; project: { org: string; repo: string }; dirs?: { docs?: string; blog?: string }; } @@ -16,9 +15,10 @@ const docsConfig = yaml.load(fs.readFileSync('./.docuservix.yml', 'utf8')) as Do const { title, - url, } = docsConfig +const url = process.env.DOCUSERVIX_URL; + const { org, repo