Skip to content

Commit

Permalink
repo: Disable old website publishing
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Northey <[email protected]>
  • Loading branch information
phlax committed Oct 10, 2023
1 parent c9d45d0 commit bfc93bd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 43 deletions.
7 changes: 0 additions & 7 deletions .azure-pipelines/pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -569,13 +569,6 @@ stages:
GCS_ARTIFACT_BUCKET: $(GcsArtifactBucket)
condition: eq(variables['isMain'], 'true')
- task: InstallSSHKey@0
inputs:
hostName: "github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk="
sshPublicKey: "$(DocsPublicKey)"
sshPassphrase: "$(SshDeployKeyPassphrase)"
sshKeySecureFile: "$(DocsPrivateKey)"

- script: docs/publish.sh
displayName: "Publish to GitHub"
workingDirectory: $(Build.SourcesDirectory)
Expand Down
36 changes: 0 additions & 36 deletions docs/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@

set -e

DOCS_DIR=generated/docs
CHECKOUT_DIR=envoy-docs
BUILD_SHA=$(git rev-parse HEAD)

VERSION="$(cat VERSION.txt)"
MAIN_BRANCH="refs/heads/main"
RELEASE_BRANCH_REGEX="^refs/heads/release/v.*"
DEV_VERSION_REGEX="-dev$"

if [[ "$VERSION" =~ $DEV_VERSION_REGEX ]]; then
Expand All @@ -29,37 +26,4 @@ if [[ "$VERSION" =~ $DEV_VERSION_REGEX ]]; then
else
echo "Ignoring docs push"
fi
exit 0
else
PUBLISH_DIR="${CHECKOUT_DIR}/docs/envoy/v${VERSION}"
fi

if [[ "${AZP_BRANCH}" != "${MAIN_BRANCH}" ]] && ! [[ "${AZP_BRANCH}" =~ ${RELEASE_BRANCH_REGEX} ]]; then
# Most likely a tag, do nothing.
echo 'Ignoring non-release branch for docs push.'
exit 0
fi

DOCS_MAIN_BRANCH="main"

echo 'cloning'
git clone [email protected]:envoyproxy/envoy-website "${CHECKOUT_DIR}" -b "${DOCS_MAIN_BRANCH}" --depth 1

if [[ -e "$PUBLISH_DIR" ]]; then
# Defense against the unexpected.
echo 'Docs version already exists, not continuing!.'
exit 1
fi

mkdir -p "$PUBLISH_DIR"
cp -r "$DOCS_DIR"/* "$PUBLISH_DIR"
cd "${CHECKOUT_DIR}"

git config user.name "envoy-docs(Azure Pipelines)"
git config user.email [email protected]

set -x

git add .
git commit -m "docs envoy@$BUILD_SHA"
git push origin "${DOCS_MAIN_BRANCH}"

0 comments on commit bfc93bd

Please sign in to comment.