|
1 | | -name: Check Code Quality (Legacy - Disabled) |
| 1 | +name: Check Code Quality |
2 | 2 |
|
3 | | -# LEGACY WORKFLOW - This workflow has been replaced by spell-and-link-check.yml |
4 | | -# Kept for reference only. Tests are disabled. |
5 | 3 | on: |
6 | | - # Scheduled runs disabled - use spell-and-link-check.yml instead |
7 | | - # schedule: |
8 | | - # - cron: '0 6 * * *' |
| 4 | + # run once a day at 6AM UTC |
| 5 | + schedule: |
| 6 | + - cron: '0 6 * * *' |
9 | 7 |
|
10 | | - # Manual runs only for backward compatibility |
| 8 | + # Allows you to run this workflow manually from the Actions tab |
11 | 9 | workflow_dispatch: |
12 | 10 |
|
13 | 11 | jobs: |
14 | | - legacy_notice: |
| 12 | + check_content: |
15 | 13 | runs-on: ubuntu-latest |
16 | 14 |
|
17 | 15 | steps: |
18 | | - - name: Legacy Workflow Notice |
| 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 |
19 | 76 | run: | |
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 |
| 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 |
0 commit comments