Skip to content

Commit fd54db0

Browse files
authored
ci: build docs in source directory for consistency
All the other workflows jobs check out into the `source` directory; do this in the documentation build job as well, for consistency across jobs.
1 parent 0e38f2b commit fd54db0

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -268,27 +268,21 @@ jobs:
268268
needs: [build_containers]
269269
runs-on: ubuntu-latest
270270
steps:
271-
- name: Setup defaults
272-
run: |
273-
if [ "${{ matrix.container.dockerfile }}" = "" ]; then
274-
echo "dockerfile=${{ matrix.container.dockerfile }}" >> $GITHUB_ENV
275-
else
276-
echo "dockerfile=${{ matrix.container.dockerfile }}" >> $GITHUB_ENV
277-
fi
278271
- name: Check out repository
279272
uses: actions/checkout@v2
280273
with:
281274
path: source
282275
fetch-depth: 0
283276
- name: Generate documentation
277+
working-directory: source
284278
run: |
285279
git config user.name 'Documentation Generation'
286280
git config user.email 'libgit2@users.noreply.github.com'
287281
git branch gh-pages origin/gh-pages
288282
docker login https://${{ env.docker-registry }} -u ${{ github.actor }} -p ${{ github.token }}
289283
docker run \
290284
--rm \
291-
-v "$(pwd)/source:/home/libgit2/source" \
285+
-v "$(pwd):/home/libgit2" \
292286
-w /home/libgit2/source \
293287
${{ env.docker-registry }}/${{ github.repository }}/docurium:latest \
294288
cm doc api.docurium
@@ -298,7 +292,8 @@ jobs:
298292
name: Upload artifact
299293
with:
300294
name: api-documentation
301-
path: api-documentation.zip
295+
path: source/api-documentation.zip
302296
- name: Push documentation branch
297+
working-directory: source
303298
run: git push origin gh-pages
304299
if: github.event_name != 'pull_request' && github.repository == 'libgit2/libgit2'

0 commit comments

Comments
 (0)