mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
ci(documentation): Skip unknown packages on old refs (#11154)
ci(documentation): handle old refs for unknown packages
This commit is contained in:
10
.github/workflows/documentation.yml
vendored
10
.github/workflows/documentation.yml
vendored
@@ -89,6 +89,11 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
declare -a PACKAGES=("brokers" "builders" "collection" "core" "discord.js" "formatters" "next" "proxy" "rest" "structures" "util" "voice" "ws")
|
declare -a PACKAGES=("brokers" "builders" "collection" "core" "discord.js" "formatters" "next" "proxy" "rest" "structures" "util" "voice" "ws")
|
||||||
for PACKAGE in "${PACKAGES[@]}"; do
|
for PACKAGE in "${PACKAGES[@]}"; do
|
||||||
|
if [ ! -d "packages/${PACKAGE}" ]; then
|
||||||
|
echo "::notice::${PACKAGE} does not exist on this ref. Skipping..."
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
cd "packages/${PACKAGE}"
|
cd "packages/${PACKAGE}"
|
||||||
sed -i 's!https://github.com/discordjs/discord.js/tree/main!https://github.com/discordjs/discord.js/tree/${{ inputs.ref }}!' api-extractor.json
|
sed -i 's!https://github.com/discordjs/discord.js/tree/main!https://github.com/discordjs/discord.js/tree/${{ inputs.ref }}!' api-extractor.json
|
||||||
../../main/packages/api-extractor/bin/api-extractor run --local --minify
|
../../main/packages/api-extractor/bin/api-extractor run --local --minify
|
||||||
@@ -222,6 +227,11 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
declare -a PACKAGES=("brokers" "builders" "collection" "core" "discord.js" "formatters" "next" "proxy" "rest" "structures" "util" "voice" "ws")
|
declare -a PACKAGES=("brokers" "builders" "collection" "core" "discord.js" "formatters" "next" "proxy" "rest" "structures" "util" "voice" "ws")
|
||||||
for PACKAGE in "${PACKAGES[@]}"; do
|
for PACKAGE in "${PACKAGES[@]}"; do
|
||||||
|
if [ ! -d "packages/${PACKAGE}" ]; then
|
||||||
|
echo "::notice::${PACKAGE} does not exist on this ref. Skipping..."
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "${PACKAGE}" == "discord.js" ]]; then
|
if [[ "${PACKAGE}" == "discord.js" ]]; then
|
||||||
mkdir -p "out/${PACKAGE}"
|
mkdir -p "out/${PACKAGE}"
|
||||||
mv "packages/${PACKAGE}/docs/docs.json" "out/${PACKAGE}/${GITHUB_REF_NAME}.json"
|
mv "packages/${PACKAGE}/docs/docs.json" "out/${PACKAGE}/${GITHUB_REF_NAME}.json"
|
||||||
|
|||||||
Reference in New Issue
Block a user