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 bb48d50 commit 2ac1991
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
name: Check Links

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
check-links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6

- name: Install awesome_bot
run: gem install awesome_bot

- name: Check non-Medium/arXiv URLs
run: |
awesome_bot README.md --allow-redirect \
--request-delay 1 \
--set-timeout 10 \
--white-list medium.com,arxiv.org
- name: Check Medium URLs
run: |
medium_urls=$(grep -Eo 'https?://[^[:space:]]+medium.com[^[:space:]]*' README.md)
Expand All @@ -29,11 +35,12 @@ jobs:
else
echo "No Medium URLs found"
fi
- name: Check arXiv URLs
run: |
arxiv_urls=$(grep -Eo 'https?://arxiv.org[^[:space:]]*' README.md)
if [ ! -z "$arxiv_urls" ]; then
awesome_bot $arxiv_urls --allow-redirect --request-delay 120 --set-timeout 150
awesome_bot $arxiv_urls --allow-redirect --request-delay 30 --set-timeout 60
else
echo "No arXiv URLs found"
fi

0 comments on commit 2ac1991

Please sign in to comment.