ci.yml 802 B

12345678910111213141516171819202122232425262728293031323334
  1. # .github/workflows/ci.yml
  2. # 持续集成工作流:用于代码风格检查和链接检查
  3. name: CI
  4. on:
  5. push:
  6. branches: [ main ]
  7. pull_request:
  8. branches: [ main ]
  9. jobs:
  10. markdown-lint:
  11. runs-on: ubuntu-latest
  12. steps:
  13. - name: Checkout code
  14. uses: actions/checkout@v3
  15. - name: Setup Node.js
  16. uses: actions/setup-node@v3
  17. with:
  18. node-version: '16'
  19. - name: Install markdownlint-cli
  20. run: npm install -g markdownlint-cli
  21. - name: Run markdownlint
  22. run: markdownlint --config .github/lint_config.json '**/*.md'
  23. link-checker:
  24. runs-on: ubuntu-latest
  25. steps:
  26. - uses: actions/checkout@v3
  27. - name: Link Checker
  28. uses: lycheeverse/lychee-action@v1.5.0
  29. with:
  30. args: --verbose --no-progress './**/*.md'