deploy-gh-pages.yml 987 B

123456789101112131415161718192021222324252627282930313233
  1. name: Deploy Github pages
  2. on:
  3. push:
  4. branches:
  5. - master # Set a branch to deploy
  6. jobs:
  7. deploy:
  8. runs-on: ubuntu-latest
  9. defaults:
  10. run:
  11. working-directory: ./exampleSite
  12. steps:
  13. - uses: actions/checkout@v2
  14. with:
  15. submodules: true # Fetch Hugo themes (true OR recursive)
  16. fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
  17. - name: Setup Hugo
  18. uses: peaceiris/actions-hugo@v2
  19. with:
  20. hugo-version: 'latest'
  21. extended: true
  22. - name: Build
  23. run: |
  24. hugo --minify
  25. - name: Deploy
  26. uses: peaceiris/actions-gh-pages@v3
  27. with:
  28. github_token: ${{ secrets.GITHUB_TOKEN }}
  29. publish_dir: ./exampleSite/public # if not specified it defaults to ./public. source directory of the built files to make the deploy (must match the build to directory in config.toml), eg ./docs, ./public, ./exampleSite/public