Skip to content

Commit 91e6d39

Browse files
committed
version name
1 parent 1787d03 commit 91e6d39

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

.github/workflows/documentation.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,19 +80,27 @@ jobs:
8080
name: Sphinx documentation
8181
runs-on: ubuntu-latest
8282

83+
outputs:
84+
version-name: ${{ steps.version-name.outputs.target }}
85+
8386
steps:
8487
# Checkout the code of the current branch
8588
- name: Checkout code
8689
uses: actions/checkout@v4
8790

91+
- name: Determine version name
92+
id: version-name
93+
run: |
94+
echo "::set-output name=target::${GITHUB_REF#*/*/}"
95+
8896
# Build the sphinx documentation
8997
# and automatically print any error or warning
9098
- name: Build sphinx documentation
9199
uses: ammaraskar/sphinx-action@master
92100
with:
93101
docs-folder: "docs/sphinx_docs/"
94102
build-command: |
95-
sphinx-build -b html -A current_version=${GITHUB_REF#*/*/} . _build
103+
sphinx-build -b html -A current_version=${{ steps.version-name.outputs.target }} . _build
96104
97105
# Create and upload an artifact `sphinx_doc` that contains the sphinx
98106
# documentation in html format.
@@ -117,29 +125,23 @@ jobs:
117125

118126
runs-on: ubuntu-latest
119127
steps:
120-
# NB: Keep in sync with sphinx_docs job
121-
- name: Determine version name
122-
id: version-name
123-
run: |
124-
echo "::set-output name=target::${GITHUB_REF#*/*/}"
125-
126128
# Retrieve sphinx documentation artifact
127129
- name: Download sphinx documentation
128130
uses: actions/download-artifact@v4
129131
with:
130132
name: sphinx_doc
131-
path: _build/${{ steps.version-name.outputs.target }}
133+
path: _build/${{ needs.sphinx_docs.outputs.version-name }}
132134

133135
# Retrieve ocaml documentation artifact
134136
- name: Download ocaml documentation
135137
uses: actions/download-artifact@v4
136138
with:
137139
name: ocaml_doc
138-
path: _build/${{ steps.version-name.outputs.target }}/odoc
140+
path: _build/${{ needs.sphinx_docs.outputs.version-name }}/odoc
139141

140142
- name: Add files to bypass nojekyll
141143
run: |
142-
touch _build/${{ steps.version-name.outputs.target }}/odoc/.nojekyll
144+
touch _build/${{ needs.sphinx_docs.outputs.version-name }}/odoc/.nojekyll
143145
144146
# Deploy files contain in _build directory on gh-pages branch
145147
- name: deploy-doc

0 commit comments

Comments
 (0)