build.yml 723 B

12345678910111213141516171819202122232425262728293031323334
  1. name: Run Build
  2. # Run action on pull request event
  3. on: [pull_request]
  4. jobs:
  5. build:
  6. runs-on: ubuntu-latest
  7. steps:
  8. # checkout to the commit that has been pushed
  9. - uses: actions/checkout@v3.3.0
  10. with:
  11. submodules: true # Fetch Hugo themes (true OR recursive)
  12. fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
  13. - name: Setup Node
  14. uses: actions/setup-node@v3
  15. with:
  16. node-version: 16
  17. - name: Install node modules
  18. run: npm install
  19. - name: Setup Hugo
  20. uses: peaceiris/actions-hugo@v2.6.0
  21. with:
  22. hugo-version: 'latest'
  23. extended: true
  24. - name: Build
  25. run: |
  26. cd exampleSite
  27. hugo --minify