summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2021-08-10 13:13:10 -0400
committerGitHub <noreply@github.com>2021-08-10 13:13:10 -0400
commitfd54db0e45b3373b5537ad37247f032251449387 (patch)
tree9521f4b3825ebd41dd88582ad2328659ec64dab9 /.github/workflows
parent0e38f2b30b07780bad5b665cdb72d32b17cb8efc (diff)
downloadlibgit2-fd54db0e45b3373b5537ad37247f032251449387.tar.gz
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.
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/main.yml13
1 files changed, 4 insertions, 9 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index fabc58c8a..d4a74d6bd 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -268,19 +268,13 @@ jobs:
needs: [build_containers]
runs-on: ubuntu-latest
steps:
- - name: Setup defaults
- run: |
- if [ "${{ matrix.container.dockerfile }}" = "" ]; then
- echo "dockerfile=${{ matrix.container.dockerfile }}" >> $GITHUB_ENV
- else
- echo "dockerfile=${{ matrix.container.dockerfile }}" >> $GITHUB_ENV
- fi
- name: Check out repository
uses: actions/checkout@v2
with:
path: source
fetch-depth: 0
- name: Generate documentation
+ working-directory: source
run: |
git config user.name 'Documentation Generation'
git config user.email 'libgit2@users.noreply.github.com'
@@ -288,7 +282,7 @@ jobs:
docker login https://${{ env.docker-registry }} -u ${{ github.actor }} -p ${{ github.token }}
docker run \
--rm \
- -v "$(pwd)/source:/home/libgit2/source" \
+ -v "$(pwd):/home/libgit2" \
-w /home/libgit2/source \
${{ env.docker-registry }}/${{ github.repository }}/docurium:latest \
cm doc api.docurium
@@ -298,7 +292,8 @@ jobs:
name: Upload artifact
with:
name: api-documentation
- path: api-documentation.zip
+ path: source/api-documentation.zip
- name: Push documentation branch
+ working-directory: source
run: git push origin gh-pages
if: github.event_name != 'pull_request' && github.repository == 'libgit2/libgit2'