Skip to content

Commit 0e90949

Browse files
Merge pull request #2808 from ArmDeveloperEcosystem/main
Production update
2 parents 2bab16b + cf38afb commit 0e90949

55 files changed

Lines changed: 748 additions & 1851 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 113 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,123 @@
1-
name: Check Code Quality
1+
name: Check Code Quality (Legacy - Disabled)
22

3+
# LEGACY WORKFLOW - This workflow has been replaced by spell-and-link-check.yml
4+
# Kept for reference only. Tests are disabled.
35
on:
4-
# run once a day at 6AM UTC
5-
schedule:
6-
- cron: '0 6 * * *'
6+
# Scheduled runs disabled - use spell-and-link-check.yml instead
7+
# schedule:
8+
# - cron: '0 6 * * *'
79

8-
# Allows you to run this workflow manually from the Actions tab
10+
# Manual runs only for backward compatibility
911
workflow_dispatch:
1012

1113
jobs:
12-
check_content:
14+
legacy_notice:
1315
runs-on: ubuntu-latest
1416

1517
steps:
16-
- name: Checkout
17-
uses: actions/checkout@v4
18-
with:
19-
submodules: true
20-
fetch-depth: 0
21-
22-
- name: Setup Hugo
23-
uses: peaceiris/actions-hugo@v3
24-
with:
25-
hugo-version: '0.130.0'
26-
extended: true
27-
28-
- name: Build
29-
run: |
30-
hugo --minify
31-
bin/pagefind --site "public"
32-
33-
- name: Check HTML links
34-
continue-on-error: true
35-
run: bin/htmltest -c .htmltest.yml -s 2>&1 | tee htmltest.log
36-
37-
- name: HTML test results
38-
uses: actions/upload-artifact@v4
39-
with:
40-
name: htmltest-report
41-
path: htmltest.log
42-
retention-days: 5 # Default is 90 days
43-
44-
- name: Spell check
45-
continue-on-error: true
46-
uses: rojopolis/spellcheck-github-actions@0.40.0
47-
with:
48-
config_path: .spellcheck.yml
49-
task_name: Markdown
50-
output_file: spellcheck-output.txt
51-
52-
- name: Refine spelling results
53-
continue-on-error: true
54-
run: tools/process-spelling.sh
55-
56-
- name: Spelling results
57-
uses: actions/upload-artifact@v4
58-
with:
59-
name: spellcheck-output
60-
path: spellcheck-output.txt
61-
retention-days: 5 # Default is 90 days
62-
- name: Scan for profanities
63-
run: |
64-
pip install better_profanity
65-
python tools/profanity.py
66-
cat profanity_log.txt
67-
68-
- name: Export profanities
69-
uses: actions/upload-artifact@v4
70-
with:
71-
name: profanities
72-
path: profanity_log.txt
73-
retention-days: 5
74-
75-
- name: Scan for malware
18+
- name: Legacy Workflow Notice
7619
run: |
77-
tools/install-scan.sh
78-
clamscan -r -i public -l scanlog
79-
80-
- name: Scan results
81-
uses: actions/upload-artifact@v4
82-
with:
83-
name: clamscan-log
84-
path: scanlog
85-
retention-days: 5 # Default is 90 days
86-
87-
- name: Azure DevOps Security Scan
88-
uses: actions/setup-dotnet@v4
89-
with:
90-
dotnet-version: |
91-
5.0.x
92-
6.0.x
93-
- name: Run Microsoft Security DevOps
94-
uses: microsoft/security-devops-action@latest
95-
id: msdo
96-
with:
97-
tools: container-mapping, bandit, eslint, templateanalyzer
98-
99-
- name: Upload results to Security tab
100-
uses: actions/upload-artifact@v4
101-
with:
102-
path: ${{ steps.msdo.outputs.sarifFile }}
103-
retention-days: 5 # Default is 90 days
20+
echo "⚠️ This workflow is legacy and has been replaced."
21+
echo ""
22+
echo "Please use the new 'spell-and-link-check.yml' workflow instead."
23+
echo "This workflow contains additional checks (profanity, malware, security)"
24+
echo "that are no longer active in the daily scheduled runs."
25+
echo ""
26+
echo "To run these checks manually, uncomment the specific job below."
27+
exit 0
28+
29+
# Uncomment individual jobs below if you need to run them manually
30+
# check_content:
31+
# runs-on: ubuntu-latest
32+
#
33+
# steps:
34+
# - name: Checkout
35+
# uses: actions/checkout@v4
36+
# with:
37+
# submodules: true
38+
# fetch-depth: 0
39+
#
40+
# - name: Setup Hugo
41+
# uses: peaceiris/actions-hugo@v3
42+
# with:
43+
# hugo-version: '0.130.0'
44+
# extended: true
45+
#
46+
# - name: Build
47+
# run: |
48+
# hugo --minify
49+
# bin/pagefind --site "public"
50+
#
51+
# - name: Check HTML links
52+
# continue-on-error: true
53+
# run: bin/htmltest -c .htmltest.yml -s 2>&1 | tee htmltest.log
54+
#
55+
# - name: HTML test results
56+
# uses: actions/upload-artifact@v4
57+
# with:
58+
# name: htmltest-report
59+
# path: htmltest.log
60+
# retention-days: 5
61+
#
62+
# - name: Spell check
63+
# continue-on-error: true
64+
# uses: rojopolis/spellcheck-github-actions@0.40.0
65+
# with:
66+
# config_path: .spellcheck.yml
67+
# task_name: Markdown
68+
# output_file: spellcheck-output.txt
69+
#
70+
# - name: Refine spelling results
71+
# continue-on-error: true
72+
# run: tools/process-spelling.sh
73+
#
74+
# - name: Spelling results
75+
# uses: actions/upload-artifact@v4
76+
# with:
77+
# name: spellcheck-output
78+
# path: spellcheck-output.txt
79+
# retention-days: 5
80+
#
81+
# - name: Scan for profanities
82+
# run: |
83+
# pip install better_profanity
84+
# python tools/profanity.py
85+
# cat profanity_log.txt
86+
#
87+
# - name: Export profanities
88+
# uses: actions/upload-artifact@v4
89+
# with:
90+
# name: profanities
91+
# path: profanity_log.txt
92+
# retention-days: 5
93+
#
94+
# - name: Scan for malware
95+
# run: |
96+
# tools/install-scan.sh
97+
# clamscan -r -i public -l scanlog
98+
#
99+
# - name: Scan results
100+
# uses: actions/upload-artifact@v4
101+
# with:
102+
# name: clamscan-log
103+
# path: scanlog
104+
# retention-days: 5
105+
#
106+
# - name: Azure DevOps Security Scan
107+
# uses: actions/setup-dotnet@v4
108+
# with:
109+
# dotnet-version: |
110+
# 5.0.x
111+
# 6.0.x
112+
#
113+
# - name: Run Microsoft Security DevOps
114+
# uses: microsoft/security-devops-action@latest
115+
# id: msdo
116+
# with:
117+
# tools: container-mapping, bandit, eslint, templateanalyzer
118+
#
119+
# - name: Upload results to Security tab
120+
# uses: actions/upload-artifact@v4
121+
# with:
122+
# path: ${{ steps.msdo.outputs.sarifFile }}
123+
# retention-days: 5

.github/workflows/deploy.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ jobs:
6969
- name: Build
7070
run: |
7171
hugo --minify
72-
cp learn-image-sitemap.xml public/learn-image-sitemap.xml
7372
bin/pagefind.aarch64 --site "public"
7473
env:
7574
HUGO_LLM_API: ${{ secrets.HUGO_LLM_API }}
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
name: Spelling and Hyperlinks Check
2+
3+
on:
4+
# run once a day at 6AM UTC
5+
schedule:
6+
- cron: '0 6 * * *'
7+
8+
# Allows you to run this workflow manually from the Actions tab
9+
workflow_dispatch:
10+
11+
jobs:
12+
spell_and_link_check:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
submodules: true
20+
fetch-depth: 0
21+
22+
- name: Setup Hugo
23+
uses: peaceiris/actions-hugo@v3
24+
with:
25+
hugo-version: '0.130.0'
26+
extended: true
27+
28+
- name: Build
29+
run: |
30+
hugo --minify
31+
bin/pagefind --site "public"
32+
33+
- name: Check HTML links
34+
id: htmltest
35+
continue-on-error: true
36+
run: |
37+
echo "## HTML Link Check Results" >> $GITHUB_STEP_SUMMARY
38+
echo "" >> $GITHUB_STEP_SUMMARY
39+
bin/htmltest -c .htmltest.yml -s 2>&1 | tee htmltest.log
40+
41+
if [ -f htmltest.log ]; then
42+
echo '```' >> $GITHUB_STEP_SUMMARY
43+
# Strip ANSI color codes for cleaner output
44+
sed 's/\x1b\[[0-9;]*m//g' htmltest.log >> $GITHUB_STEP_SUMMARY
45+
echo '```' >> $GITHUB_STEP_SUMMARY
46+
fi
47+
48+
- name: HTML test results artifact
49+
if: always()
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: htmltest-report
53+
path: htmltest.log
54+
retention-days: 5
55+
56+
- name: Spell check
57+
id: spellcheck
58+
continue-on-error: true
59+
uses: rojopolis/spellcheck-github-actions@0.40.0
60+
with:
61+
config_path: .spellcheck.yml
62+
task_name: Markdown
63+
output_file: spellcheck-output.txt
64+
65+
- name: Refine spelling results
66+
if: always()
67+
continue-on-error: true
68+
run: tools/process-spelling.sh
69+
70+
- name: Display spelling results
71+
if: always()
72+
run: |
73+
echo "## Spell Check Results" >> $GITHUB_STEP_SUMMARY
74+
echo "" >> $GITHUB_STEP_SUMMARY
75+
76+
if [ -f spellcheck-output.txt ]; then
77+
# Count total issues
78+
ISSUE_COUNT=$(grep -c "^" spellcheck-output.txt || echo "0")
79+
echo "**Total spelling issues found:** $ISSUE_COUNT" >> $GITHUB_STEP_SUMMARY
80+
echo "" >> $GITHUB_STEP_SUMMARY
81+
82+
# Show first 100 lines if file is large
83+
LINE_COUNT=$(wc -l < spellcheck-output.txt)
84+
if [ "$LINE_COUNT" -gt 100 ]; then
85+
echo "**Showing first 100 issues (total: $LINE_COUNT):**" >> $GITHUB_STEP_SUMMARY
86+
echo "" >> $GITHUB_STEP_SUMMARY
87+
echo '```' >> $GITHUB_STEP_SUMMARY
88+
head -100 spellcheck-output.txt >> $GITHUB_STEP_SUMMARY
89+
echo '```' >> $GITHUB_STEP_SUMMARY
90+
echo "" >> $GITHUB_STEP_SUMMARY
91+
echo "See the full report in the spellcheck-output artifact." >> $GITHUB_STEP_SUMMARY
92+
else
93+
echo '```' >> $GITHUB_STEP_SUMMARY
94+
cat spellcheck-output.txt >> $GITHUB_STEP_SUMMARY
95+
echo '```' >> $GITHUB_STEP_SUMMARY
96+
fi
97+
else
98+
echo "No spelling issues found or spell check did not run." >> $GITHUB_STEP_SUMMARY
99+
fi
100+
101+
- name: Spelling results artifact
102+
if: always()
103+
uses: actions/upload-artifact@v4
104+
with:
105+
name: spellcheck-output
106+
path: spellcheck-output.txt
107+
retention-days: 5
108+
109+
- name: Summary
110+
if: always()
111+
run: |
112+
echo "" >> $GITHUB_STEP_SUMMARY
113+
echo "---" >> $GITHUB_STEP_SUMMARY
114+
echo "" >> $GITHUB_STEP_SUMMARY
115+
echo "### Check Complete" >> $GITHUB_STEP_SUMMARY
116+
echo "" >> $GITHUB_STEP_SUMMARY
117+
echo "- **HTML Link Check:** $([ -f htmltest.log ] && echo '✓ Complete' || echo '✗ Failed')" >> $GITHUB_STEP_SUMMARY
118+
echo "- **Spell Check:** $([ -f spellcheck-output.txt ] && echo '✓ Complete' || echo '✗ Failed')" >> $GITHUB_STEP_SUMMARY
119+
echo "" >> $GITHUB_STEP_SUMMARY
120+
echo "Download full reports from the artifacts section below." >> $GITHUB_STEP_SUMMARY
121+
# Testing workflow detection

0 commit comments

Comments
 (0)