Skip to content

Update accessibility-scan.yml #13

Update accessibility-scan.yml

Update accessibility-scan.yml #13

# This workflow uses actions to scan for accessibility
name: Accessibility Scan
on: [push, pull_request]
jobs:
accessibility:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '14'
- name: Install dependencies
run: npm install
- name: Install axe-cli and http-server
run: npm install -g axe-cli http-server
- name: Start local server
run: |
nohup http-server ./ &
- name: Create axe-reports directory
run: mkdir -p ./axe-reports
- name: Run axe-cli accessibility scan
run: npx axe-cli http://localhost:8080 --output html --output-path ./axe-reports/accessibility-report.html
- name: Verify report creation
run: |
ls -la ./axe-reports/
cat ./axe-reports/accessibility-report.html || echo "Report not created"
- name: Upload axe-core report
uses: actions/upload-artifact@v3
with:
name: axe-report
path: ./axe-reports/accessibility-report.html
ls -la ./axe-reports/

Check failure on line 45 in .github/workflows/accessibility-scan.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/accessibility-scan.yml

Invalid workflow file

You have an error in your yaml syntax on line 45
cat ./axe-reports/accessibility-report.html || echo "Report not created"
- name: Upload axe-core report
uses: actions/upload-artifact@v3
with:
name: axe-report
path: ./axe-reports/accessibility-report.html