Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cd: Update Deploy Site workflow #13

Merged
merged 2 commits into from
Aug 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading