ci.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # Based on the sample workflow for building and deploying a Hugo site to GitHub Pages
  2. name: Build Hugo site
  3. on:
  4. # Build on all PRs
  5. pull_request:
  6. # Allows you to run this workflow manually from the Actions tab
  7. workflow_dispatch:
  8. # Allow one concurrent build per PR
  9. concurrency:
  10. group: ${{ github.workflow }}-${{ github.ref }}
  11. cancel-in-progress: true
  12. jobs:
  13. # Build job
  14. build:
  15. runs-on: ubuntu-latest
  16. env:
  17. HUGO_VERSION: 0.130.0
  18. steps:
  19. - name: Install Hugo CLI
  20. run: |
  21. wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
  22. && sudo dpkg -i ${{ runner.temp }}/hugo.deb
  23. - name: Checkout
  24. uses: actions/checkout@v4
  25. with:
  26. submodules: recursive
  27. - name: Setup Pages
  28. id: pages
  29. uses: actions/configure-pages@v5
  30. - name: Build with Hugo
  31. env:
  32. # For maximum backward compatibility with Hugo modules
  33. HUGO_ENVIRONMENT: production
  34. HUGO_ENV: production
  35. run: >
  36. hugo
  37. --minify
  38. --baseURL "${{ steps.pages.outputs.base_url }}/"
  39. -s "./exampleSite/"
  40. --themesDir "../../"
  41. --logLevel info
  42. - name: Upload artifact
  43. uses: actions/upload-pages-artifact@v3
  44. with:
  45. path: ./exampleSite/public