Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Giri-Aayush authored Oct 15, 2024
1 parent 2149cde commit 19170d8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Build
name: Check Links
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
check-links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -16,12 +16,13 @@ jobs:
- name: Install awesome_bot
run: gem install awesome_bot
- name: Check non-Medium URLs
run: awesome_bot README.md --allow-redirect --request-delay 0.2 --white-list medium.com
run: |
awesome_bot README.md --allow-redirect --request-delay 0.2 --white-list medium.com
- name: Check Medium URLs
run: |
medium_urls=$(grep -Eo 'https?://[^[:space:]]+medium.com[^[:space:]]*' README.md | tr '\n' ' ')
medium_urls=$(grep -Eo 'https?://[^[:space:]]+medium.com[^[:space:]]*' README.md)
if [ ! -z "$medium_urls" ]; then
awesome_bot $medium_urls --allow-redirect --request-delay 5
echo "$medium_urls" | awesome_bot --allow-redirect --request-delay 5 -
else
echo "No Medium URLs found"
fi

0 comments on commit 19170d8

Please sign in to comment.