From 7c544e9e66631b3c66feb48bef4baaf5e5120d8c Mon Sep 17 00:00:00 2001 From: Lucy Liu Date: Tue, 31 May 2022 21:59:58 +1000 Subject: [PATCH] DOC Update deploy docs workflow for multiversion (#175) * update github workflow deploy docs * update github workflow deploy docs --- .github/workflows/deploy-docs.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index cd33b687..ad15c56b 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -22,6 +22,14 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Get TAG + run: echo "TAG=${{ github.ref_name }}" >> $GITHUB_ENV + + - name: Get DOC_DIR + run: | + DOC_DIR="$(cut -d '.' -f 1,2 <<< "$TAG")" + echo "DOC_DIR=${DOC_DIR:1}".x >> $GITHUB_ENV + - name: Set up Qt uses: tlambert03/setup-qt-libs@v1 @@ -49,11 +57,22 @@ jobs: working-directory: doc run: make html - - name: Deploy docs 🚀 + - name: Deploy dev docs 🚀 + uses: JamesIves/github-pages-deploy-action@4.1.5 + with: + branch: gh-pages + folder: doc/_build/html + target-folder: dev + clean: true + + - name: Deploy stable docs 🚀 uses: JamesIves/github-pages-deploy-action@4.1.5 + if: startsWith(env.TAG, 'v') with: branch: gh-pages folder: doc/_build/html + target-folder: ${{ env.DOC_DIR }} + clean: true - name: Cache uses: actions/cache@v2