build-test-site.yaml 2.0 KB

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