Skip to content

Commit

Permalink
Fetch Documentation repo conditionally as recommended by @infotroph
Browse files Browse the repository at this point in the history
  • Loading branch information
Sweetdevil144 committed Jan 5, 2025
1 parent 6c343b5 commit d99113a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,18 @@ jobs:
with:
name: pecan-documentation
path: book_source/_book/
# check if documentation repo exists
- name: Check if documentation repo exists
id: doc_exists
run: |
if git ls-remote https://github.com/${{ github.repository_owner }}/pecan-documentation.git > /dev/null 2>&1; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi
# download documentation repo
- name: Checkout documentation repo
if: github.event_name == 'push' && github.repository == 'pecanProject/pecan'
if: ${{ github.event_name == 'push' && steps.doc_exists.outputs.exists == 'true' }}
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/pecan-documentation
Expand Down

0 comments on commit d99113a

Please sign in to comment.