diff --git a/.github/workflows/doc-tests.yaml b/.github/workflows/doc-tests.yaml index 5ee9343a6972a..037d8c845c0f1 100644 --- a/.github/workflows/doc-tests.yaml +++ b/.github/workflows/doc-tests.yaml @@ -96,14 +96,15 @@ jobs: run: | echo "" > .gitmodules rm -rf content/* - cd content + cd content || exit 1 # Rather than using a submodule, copy the teleport source into the # content directory. - cp -r $GITHUB_WORKSPACE/teleport $GITHUB_WORKSPACE/docs/content/current - cd $GITHUB_WORKSPACE/docs - jq -nr --arg version $BRANCH '{"versions": [{"name": $version,"branch": $version, "deprecated": false, "latest": true, "current": true }]}' > config.json - cat <<< "$(jq '.scripts."git-update" = "echo Skipping submodule update"' package.json)" > package.json - cat <<< "$(jq '.scripts."prepare-sanity-data" = "echo Using pre-populated Sanity data"' package.json)" > package.json + cp -r "$GITHUB_WORKSPACE/teleport" "$GITHUB_WORKSPACE/docs/content/current" + cd "$GITHUB_WORKSPACE/docs" || exit 1 + jq -nr --arg version "$BRANCH" '{"versions": [{"name": $version,"branch": $version, "deprecated": false, "latest": true, "current": true }]}' > config.json + NEW_PACKAGE_JSON=$(jq '.scripts."git-update" = "echo Skipping submodule update"' package.json); + NEW_PACKAGE_JSON=$(jq '.scripts."prepare-sanity-data" = "echo Using pre-populated Sanity data"' <<< "$NEW_PACKAGE_JSON"); + echo "$NEW_PACKAGE_JSON" > package.json; echo "{}" > data/events.json echo '{"bannerButtons":{"second":{"title":"LOG IN","url":"https://teleport.sh"},"first":{"title":"Support","url":"https://goteleport.com/support/"}},"navbarData":{"rightSide":{},"logo":"/favicon.svg","menu":[]}}' > data/navbar.json