Skip to content

added hugo build action #11

added hugo build action

added hugo build action #11

Workflow file for this run

name: "Update documentation"
on:
push:
tags:
- v*
branches: [ "master" ]
paths: [ "docs/*", "hack/hugo/*", ".github/workflows/update-doc.yaml" ]
pull_request:
paths: [ "docs/*", "hack/hugo/*", ".github/workflows/update-doc.yaml" ]
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
defaults:
run:
shell: bash
working-directory: ./hack/hugo/hugo-test
jobs:
hugo:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
# sparse-checkout: |
# hack/
# docs/
-
name: check
run: |
echo $(pwd)
ls
find -L themes
-
name: Run Hugo
uses: crazy-max/ghaction-hugo@v3
with:
version: latest
extended: true
args: --cleanDestinationDir --minify -D --printPathWarnings --ignoreCache --cleanDestinationDir --noBuildLock
-
name: Deploy to GitHub Pages
if: github.event_name != 'pull_request'
uses: crazy-max/ghaction-github-pages@v4
with:
target_branch: gh-pages
build_dir: public
repo: github.com/fredbi/go-swagger.github.io
allow_empty_commit: false
jekyll: false
verbose: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}