Skip to content

Commit

Permalink
calc lib name for sphinx docs artifact name
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 committed Feb 21, 2024
1 parent 60be802 commit 9c018e9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9c018e9

Please sign in to comment.