@@ -80,19 +80,27 @@ jobs:
80
80
name : Sphinx documentation
81
81
runs-on : ubuntu-latest
82
82
83
+ outputs :
84
+ version-name : ${{ steps.version-name.outputs.target }}
85
+
83
86
steps :
84
87
# Checkout the code of the current branch
85
88
- name : Checkout code
86
89
uses : actions/checkout@v4
87
90
91
+ - name : Determine version name
92
+ id : version-name
93
+ run : |
94
+ echo "::set-output name=target::${GITHUB_REF#*/*/}"
95
+
88
96
# Build the sphinx documentation
89
97
# and automatically print any error or warning
90
98
- name : Build sphinx documentation
91
99
uses : ammaraskar/sphinx-action@master
92
100
with :
93
101
docs-folder : " docs/sphinx_docs/"
94
102
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
96
104
97
105
# Create and upload an artifact `sphinx_doc` that contains the sphinx
98
106
# documentation in html format.
@@ -117,29 +125,23 @@ jobs:
117
125
118
126
runs-on : ubuntu-latest
119
127
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
-
126
128
# Retrieve sphinx documentation artifact
127
129
- name : Download sphinx documentation
128
130
uses : actions/download-artifact@v4
129
131
with :
130
132
name : sphinx_doc
131
- path : _build/${{ steps.version-name .outputs.target }}
133
+ path : _build/${{ needs.sphinx_docs .outputs.version-name }}
132
134
133
135
# Retrieve ocaml documentation artifact
134
136
- name : Download ocaml documentation
135
137
uses : actions/download-artifact@v4
136
138
with :
137
139
name : ocaml_doc
138
- path : _build/${{ steps.version-name .outputs.target }}/odoc
140
+ path : _build/${{ needs.sphinx_docs .outputs.version-name }}/odoc
139
141
140
142
- name : Add files to bypass nojekyll
141
143
run : |
142
- touch _build/${{ steps.version-name .outputs.target }}/odoc/.nojekyll
144
+ touch _build/${{ needs.sphinx_docs .outputs.version-name }}/odoc/.nojekyll
143
145
144
146
# Deploy files contain in _build directory on gh-pages branch
145
147
- name : deploy-doc
0 commit comments