From 2ac19917887ffa3b550102e9523e61e3ed597165 Mon Sep 17 00:00:00 2001 From: Aayush Giri <101140354+Giri-Aayush@users.noreply.github.com> Date: Tue, 15 Oct 2024 17:28:21 +0530 Subject: [PATCH] Update ci.yml --- .github/workflows/ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02d65e8..a75239e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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) @@ -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