diff --git a/.github/workflows/deploy-site.yml b/.github/workflows/deploy-site.yml index 13402789cc..c914e6532b 100644 --- a/.github/workflows/deploy-site.yml +++ b/.github/workflows/deploy-site.yml @@ -18,21 +18,31 @@ # name: Deploy Site -on: - push: - branches: - - 'master' +on: push jobs: deploy: name: Deploy Site runs-on: ubuntu-20.04 - if: github.event.repository.fork == false +# if: github.event.repository.fork == false steps: - uses: actions/checkout@v3 with: ref: master + - name: Check For Content Changes + run: | + latest_commit=$(git rev-parse HEAD) + previous_commit=$(git rev-parse HEAD~1) + content_changed=$(git diff --name-only $previous_commit $latest_commit | grep -E '\.(html|css|js|py|md|rst)$') + + if [ -z "$content_changed" ]; then + echo "No relevant changes detected." + exit 0 + else + echo "Relevant changes detected." + fi + - name: Install Dependencies run: | sudo apt-get update