generated from shuding/nextra-docs-template
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
Showing
1 changed file
with
58 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |