build-test-site.yaml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. name: Continuous Integration
  2. on:
  3. push:
  4. branches:
  5. - main
  6. pull_request:
  7. branches:
  8. - main
  9. jobs:
  10. build:
  11. runs-on: ${{ matrix.os }}
  12. strategy:
  13. matrix:
  14. os: [ubuntu-latest]
  15. node-version: [15.x]
  16. steps:
  17. - uses: actions/checkout@v2
  18. with:
  19. submodules: true # Fetch any Git submodules (true OR recursive)
  20. fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
  21. - name: Use Node.js ${{ matrix.node-version }}
  22. uses: actions/setup-node@v1
  23. with:
  24. node-version: ${{ matrix.node-version }}
  25. - name: Install JS dependencies
  26. run: rm -rf node_modules && yarn install --frozen-lockfile
  27. - name: Check for linting errors
  28. run: yarn run lint
  29. # format:
  30. # runs-on: ubuntu-latest
  31. #
  32. # steps:
  33. # - name: Checkout
  34. # uses: actions/checkout@v2
  35. # with:
  36. # # Make sure the actual branch is checked out when running on pull requests
  37. # ref: ${{ github.head_ref }}
  38. #
  39. # - name: Prettify code
  40. # uses: creyD/prettier_action@v3.1
  41. # with:
  42. # prettier_options: '--write wowchemy/*.{css,js,json,md,scss} wowchemy/**/*.{css,js,json,md,scss}' # Match package.json
  43. # prettier_version: '2.2.1' # Match package.json
  44. # commit_message: 'refactor: format code'
  45. # env:
  46. # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  47. hugo:
  48. runs-on: ubuntu-latest
  49. steps:
  50. - uses: actions/checkout@v2
  51. with:
  52. submodules: true # Fetch any Git submodules (true OR recursive)
  53. fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
  54. - name: Setup Hugo
  55. uses: peaceiris/actions-hugo@v2
  56. with:
  57. hugo-version: 'latest'
  58. extended: true
  59. - name: Build
  60. run: hugo --minify
  61. working-directory: test