From 77a01a0a1c2ce613f611b99f2446e30477c0e10d Mon Sep 17 00:00:00 2001 From: JoFrhwld Date: Sun, 30 Jun 2024 15:52:41 -0400 Subject: [PATCH] trying to fix this thing --- .github/workflows/build-site.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-site.yml b/.github/workflows/build-site.yml index d3d38b3..b1ea735 100644 --- a/.github/workflows/build-site.yml +++ b/.github/workflows/build-site.yml @@ -9,6 +9,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + with: + fetch-depth: 2 - uses: actions/setup-python@v2 with: python-version: "3.11" @@ -24,11 +26,17 @@ jobs: - name: Build Research pages run: | python make_research_qmd.py --zotero_key ${{ secrets.ZOTERO_KEY }} - git config user.name 'bot' - git config user.email '...' - git add research/papers/* - git commit -m "gh workflow build [skip actions]" - git push + - name: Commit if diff + run: | + if git diff --exit-code; then + echo "No Changes" + else: + git config user.name 'bot' + git config user.email '...' + git add research/papers/* + git commit -m "gh workflow build [skip actions]" --no-verify + git push + fi - name: Render and publish to gh pages uses: quarto-dev/quarto-actions/publish@v2 with: