Skip to content

Commit

Permalink
fix indent
Browse files Browse the repository at this point in the history
  • Loading branch information
holtzy committed Feb 21, 2024
1 parent 2e2f468 commit 576ec54
Showing 1 changed file with 29 additions and 40 deletions.
69 changes: 29 additions & 40 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
name: "Update Ads.txt file"

# on:
# schedule:
# - cron: "0 0 * * *"

on:
push:
branches:
- '*'
- "*"

jobs:
update-ads-txt:
Expand All @@ -17,38 +13,31 @@ jobs:
uses: actions/checkout@v3

- name: Fetch ads.txt content
run: |
curl -L https://ads.adthrive.com/sites/643436a4e6d20859e40a446b/ads.txt > fetched_ads.txt
if [ $? -eq 0 ]; then
echo "ads.txt fetched successfully."
else
echo "Failed to fetch ads.txt."
exit 1
fi
- name: Compare fetched file with existing ads.txt
id: compare-files
run: |
if cmp -s fetched_ads.txt ads.txt; then
echo "No changes in ads.txt."
exit 0
else
echo "ads.txt has changed."
mv fetched_ads.txt ads.txt
fi
- name: Commit and push changes
if: steps.compare-files.outputs.result != 'No changes in ads.txt.'
run: |
git config user.name github-actions
git config user.email [email protected]
git add ads.txt
git commit -m "Update ads.txt"
git push
run: |
curl -L https://ads.adthrive.com/sites/643436a4e6d20859e40a446b/ads.txt > fetched_ads.txt
if [ $? -eq 0 ]; then
echo "ads.txt fetched successfully."
else
echo "Failed to fetch ads.txt."
exit 1
fi
- name: Compare fetched file with existing ads.txt
id: compare-files
run: |
if cmp -s fetched_ads.txt ads.txt; then
echo "No changes in ads.txt."
exit 0
else
echo "ads.txt has changed."
mv fetched_ads.txt ads.txt
fi
- name: Commit and push changes
if: steps.compare-files.outputs.result != 'No changes in ads.txt.'
run: |
git config user.name github-actions
git config user.email [email protected]
git add ads.txt
git commit -m "Update ads.txt"
git push

0 comments on commit 576ec54

Please sign in to comment.