Skip to content

Check Code Quality #116

Check Code Quality

Check Code Quality #116

name: Check Code Quality
on:
# run once a day at 6AM UTC
schedule:
- cron: '0 6 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
check_content:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.98.0'
extended: true
- name: Build
run: hugo --minify
- name: Check HTML links
continue-on-error: true
run: bin/htmltest -c .htmltest.yml -s 2>&1 | tee htmltest.log
- name: HTML test results
uses: actions/upload-artifact@v3
with:
name: htmltest-report
path: htmltest.log
retention-days: 7 # Default is 90 days
- name: Spell check
uses: rojopolis/spellcheck-github-actions@0.30.0
with:
config_path: .spellcheck.yml
task_name: Markdown
output_file: spellcheck-output.txt
- name: Spelling results
uses: actions/upload-artifact@v3
with:
name: spellcheck-output
path: spellcheck-output.txt
retention-days: 7 # Default is 90 days
- name: Scan for malware
run: |
tools/install-scan.sh
clamscan -r -i public -l scanlog
- name: Scan results
uses: actions/upload-artifact@v3
with:
name: clamscan-log
path: scanlog
retention-days: 7 # Default is 90 days
- name: Azure DevOps Security Scan
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
5.0.x
6.0.x
- name: Run Microsoft Security DevOps
uses: microsoft/security-devops-action@preview
id: msdo
- name: Upload results to Security tab
uses: actions/upload-artifact@v3
with:
path: ${{ steps.msdo.outputs.sarifFile }}
retention-days: 7 # Default is 90 days