From f031e0fed340a2a8b2d7805af252d63f725ee8a8 Mon Sep 17 00:00:00 2001 From: Archit Gupta <71798289+archigup@users.noreply.github.com> Date: Mon, 13 Dec 2021 17:37:34 -0800 Subject: [PATCH] Add and mainain `latest` link in doxygen deployment (#40) --- doxygen-generation/action.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/doxygen-generation/action.yml b/doxygen-generation/action.yml index 43cce692..9c1c2153 100644 --- a/doxygen-generation/action.yml +++ b/doxygen-generation/action.yml @@ -92,13 +92,15 @@ runs: jq '.branches//=["main"]' > tmp.json mv tmp.json _data/doc_config.json - - name: Add to release list + - name: Add to release list and update latest if: inputs.add_release != 'false' - working-directory: ./doxygen_store/_data + working-directory: ./doxygen_store/ shell: bash run: | - jq '.releases|=if index("${{ inputs.ref }}") then . else ["${{ inputs.ref }}"]+. end' doc_config.json > tmp.json - mv tmp.json doc_config.json + jq '.releases|=if index("${{ inputs.ref }}") then . else ["${{ inputs.ref }}"]+. end' _data/doc_config.json > tmp.json + mv tmp.json _data/doc_config.json + rm -f latest + ln -s "${{ inputs.ref }}" latest - name: Commit new doxygen working-directory: ./doxygen_store