Skip to content

Commit

Permalink
Update url_check.yml
Browse files Browse the repository at this point in the history
chore: disable broken URL check workflow temporarily

- Commented out the automatic URL checking GitHub Actions workflow
- Temporary measure to stop false positives while further investigation is pending
  • Loading branch information
cordt-sei authored Oct 15, 2024
1 parent cf2dc94 commit 6b7e409
Showing 1 changed file with 58 additions and 58 deletions.
116 changes: 58 additions & 58 deletions .github/workflows/url_check.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
name: Broken URL Check

on:
schedule:
- cron: '0 0 * * 1'
workflow_dispatch:

jobs:
url-check:
runs-on: ubuntu-latest
permissions:
contents: read
issues: write

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
- name: Run link checker
id: run_checker
run: |
python scripts/urlcheck.py > checker_output.json
cat checker_output.json
env:
CHECK_PATH: './pages/'

- name: Process results
id: process_results
run: |
json_output=$(cat checker_output.json)
echo "Raw output:"
echo "$json_output"
total_issues=$(echo "$json_output" | jq -r '.total_issues')
echo "TOTAL_ISSUES=$total_issues" >> $GITHUB_ENV
# name: Broken URL Check

# on:
# schedule:
# - cron: '0 0 * * 1'
# workflow_dispatch:

# jobs:
# url-check:
# runs-on: ubuntu-latest
# permissions:
# contents: read
# issues: write

# steps:
# - name: Checkout code
# uses: actions/checkout@v3

# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: '3.x'

# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install requests

# - name: Run link checker
# id: run_checker
# run: |
# python scripts/urlcheck.py > checker_output.json
# cat checker_output.json
# env:
# CHECK_PATH: './pages/'

# - name: Process results
# id: process_results
# run: |
# json_output=$(cat checker_output.json)
# echo "Raw output:"
# echo "$json_output"
# total_issues=$(echo "$json_output" | jq -r '.total_issues')
# echo "TOTAL_ISSUES=$total_issues" >> $GITHUB_ENV

if [ "$total_issues" -gt 0 ]; then
issue_table=$(echo "$json_output" | jq -r '.issues[] | "| \(.file) | \(.line) | \(.url) | \(.status_code) | \(.reason) |"' | sed -e 's/^/ /')
echo 'ISSUE_TABLE<<EOF' >> $GITHUB_ENV
echo "$issue_table" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
fi
- name: Create Issue
if: ${{ env.TOTAL_ISSUES > 0 }}
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filename: .github/ISSUE_TEMPLATE_URL_CHECK.md
# if [ "$total_issues" -gt 0 ]; then
# issue_table=$(echo "$json_output" | jq -r '.issues[] | "| \(.file) | \(.line) | \(.url) | \(.status_code) | \(.reason) |"' | sed -e 's/^/ /')
# echo 'ISSUE_TABLE<<EOF' >> $GITHUB_ENV
# echo "$issue_table" >> $GITHUB_ENV
# echo 'EOF' >> $GITHUB_ENV
# fi

# - name: Create Issue
# if: ${{ env.TOTAL_ISSUES > 0 }}
# uses: JasonEtco/create-an-issue@v2
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# filename: .github/ISSUE_TEMPLATE_URL_CHECK.md

0 comments on commit 6b7e409

Please sign in to comment.