docs.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. name: Docs
  2. on:
  3. push:
  4. branches:
  5. - master
  6. - v4-dev
  7. pull_request:
  8. branches:
  9. - "**"
  10. env:
  11. FORCE_COLOR: 2
  12. NODE: 16.x
  13. RUBY: 2.7
  14. jobs:
  15. run:
  16. runs-on: ubuntu-latest
  17. steps:
  18. - name: Clone repository
  19. uses: actions/checkout@v2
  20. - name: Set up Node.js
  21. uses: actions/setup-node@v2
  22. with:
  23. node-version: "${{ env.NODE }}"
  24. - name: Set up Ruby
  25. uses: ruby/setup-ruby@v1
  26. with:
  27. ruby-version: "${{ env.RUBY }}"
  28. bundler-cache: true
  29. working-directory: docs
  30. - name: Version info
  31. run: |
  32. ruby --version
  33. gem --version
  34. bundle --version
  35. java -version
  36. - name: Set up npm cache
  37. uses: actions/cache@v2
  38. with:
  39. path: ~/.npm
  40. key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}}
  41. restore-keys: |
  42. ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
  43. ${{ runner.os }}-node-v${{ env.NODE }}-
  44. - name: Install npm dependencies
  45. run: npm ci
  46. - name: Build docs
  47. run: npm run docs-compile
  48. - name: Run HTML validator
  49. run: npm run docs-lint