diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index fcd187629..9b64483ee 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -51,9 +51,34 @@ jobs: - name: Build dependencies run: pnpm run build + - name: Checkout main repository + if: ${{ inputs.ref && inputs.ref != 'main' }} + uses: actions/checkout@v3 + with: + path: 'main' + + - name: Build main + if: ${{ inputs.ref && inputs.ref != 'main' }} + shell: bash + run: | + cd main + pnpm install --frozen-lockfile --prefer-offline --loglevel error + pnpm run build + cd .. + - name: Build docs run: pnpm run docs + - name: Build docs with main api-extractor + if: ${{ inputs.ref && inputs.ref != 'main' }} + run: | + declare -a PACKAGES=("brokers" "builders" "collection" "core" "discord.js" "formatters" "next" "proxy" "rest" "util" "voice" "ws") + for PACKAGE in "${PACKAGES[@]}"; do + cd "packages/${PACKAGE}" + ../../main/packages/api-extractor/bin/api-extractor run --local --minify + cd ../.. + done + - name: Checkout docs repository uses: actions/checkout@v3 with: