New Use Cases #131
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Deploy Hugo Docs | |
| on: | |
| push: | |
| branches: | |
| - docs | |
| paths: | |
| - "**" # trigger on any change in docs branch (optional refine) | |
| jobs: | |
| build-deploy: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: . | |
| steps: | |
| - name: Checkout docs branch | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Hugo | |
| uses: peaceiris/actions-hugo@v3 | |
| with: | |
| hugo-version: "0.152.2" | |
| extended: true | |
| - name: Build site | |
| run: hugo --minify | |
| - name: Deploy to gh-pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_branch: gh-pages | |
| publish_dir: ./public | |
| keep_files: false |