Skip to content

Commit

Permalink
Merge pull request #13 from wpiet/ci-deploy-fix
Browse files Browse the repository at this point in the history
cd: Update `Deploy Site` workflow
  • Loading branch information
wpiet authored Aug 7, 2024
2 parents 0d0e59b + 65d5b78 commit b516342
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/deploy-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b516342

Please sign in to comment.