diff --git a/.buildkite/release.yml b/.buildkite/release.yml index 0e2bd355057..20f1f8ffd25 100644 --- a/.buildkite/release.yml +++ b/.buildkite/release.yml @@ -132,3 +132,8 @@ steps: - "./docker-build-push" agents: system: x86_64-linux + + - label: Update Documentation Links + depends_on: create-release + commands: + - nix develop path:$RELEASE_SCRIPTS_DIR -c $RELEASE_SCRIPTS_DIR/update-documentation-links.sh diff --git a/scripts/buildkite/release/update-documentation-links.sh b/scripts/buildkite/release/update-documentation-links.sh new file mode 100755 index 00000000000..39ee94bfbeb --- /dev/null +++ b/scripts/buildkite/release/update-documentation-links.sh @@ -0,0 +1,13 @@ +#! /usr/bin/env bash + +set -euox pipefail + +RELEASE_VERSION=$(buildkite-agent meta-data get release-version) +GH_PAGES_BRANCH="gh-pages" + +git checkout "${GH_PAGES_BRANCH}" +git pull origin "${GH_PAGES_BRANCH}" +cd releases +./make_redirects.sh "${RELEASE_VERSION}" +git remote set-url origin "https://$GITHUB_TOKEN@github.com/cardano-foundation/cardano-wallet.git" +git push origin "${GH_PAGES_BRANCH}" \ No newline at end of file