Skip to content

Security Check

Security Check #13391

Workflow file for this run

name: Security Check
on:
workflow_dispatch:
schedule:
- cron: '*/30 * * * *'
jobs:
process-queue:
runs-on: ubuntu-latest
steps:
- name: Login and check for changes
uses: garygrossgarten/github-action-ssh@release
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
privateKey: ${{ secrets.SSH_KEY }}
command: |
cd ~/providencedenver.org/web
status=$(git status)
if [[ $status =~ "Untracked files:" && $status =~ "wp-content/plugins/insert-headers-and-footers/" ]]; then
rm -rf wp-content/plugins/insert-headers-and-footers/
log_file="$HOME/github_action_security_check.txt"
current_date=$(date +"%Y-%m-%d %H:%M:%S")
log_message="Logged at: $current_date"
echo "$log_message" > "$log_file"
fi