From a20909499bcc207148962dfd3ca8454306cc0ec0 Mon Sep 17 00:00:00 2001 From: Chris Trevino Date: Tue, 30 Jul 2024 07:27:50 -0700 Subject: [PATCH] Update docsite publish steps (#1235) * limit doc pubilcation --------- Signed-off-by: Chris Trevino --- .github/workflows/docs-release.yml | 15 ++++++++++++++- .github/workflows/docs.yml | 3 ++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs-release.yml b/.github/workflows/docs-release.yml index 79593b8312..b5fa64c9a1 100644 --- a/.github/workflows/docs-release.yml +++ b/.github/workflows/docs-release.yml @@ -34,9 +34,22 @@ jobs: run: ./docs/generate_docs.sh env: DOCS_VERSION: ${{ env.release_tag }} + + - name: Prune old doc versions + run: | + mkdir -p ./tmp + mv ./dowhy_docs/$VERSION ./tmp/$VERSION + rm -rf ./dowhy-docs/* + mv ./tmp/$VERSION ./dowhy-docs/$VERSION + echo "Assets ready, listing contents..." + find ./dowhy-docs + env: + VERSION: ${{ env.release_tag }} - name: Commit and push to gh-pages branch uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./dowhy-docs + exclude_assets: '.github' + publish_dir: ./dowhy-docs/ + keep_files: true diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9a5a4e8fe5..c9795ac7ba 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -36,4 +36,5 @@ jobs: uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./dowhy-docs + publish_dir: ./dowhy-docs/main + destination_dir: ./main