From 9c018e90b8284a4eee9591f80c3e16fa52590274 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Wed, 21 Feb 2024 01:40:18 -0800 Subject: [PATCH] calc lib name for sphinx docs artifact name --- .github/workflows/sphinx.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index c783fb2..0a6eb42 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -24,10 +24,19 @@ jobs: if: github.ref != 'refs/heads/main' run: sphinx-build docs ${{ inputs.path-to-doc }} + - name: get artifact name + id: artifact-name + shell: python + run: | + import os + lib_name = "${{ github.repository }}".split("/")[1] + with open(os.environ.get("GITHUB_OUTPUT")) as gh_out: + gh_out.write(f"lib-name={lib_name}\n") + - name: Upload docs build as artifact uses: actions/upload-artifact@v4 with: - name: ${{ github.repository }}_docs + name: ${{ steps.artifact-name.outputs.lib-name }}_docs path: ${{ github.workspace }}/${{ inputs.path-to-doc }} - name: Upload to github pages