Skip to content

added hugo build action #5

added hugo build action

added hugo build action #5

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: true
# sparse-checkout: |
# hack/
# docs/
-
name: check
run: |
echo $(pwd)
ls
ls themes
-
name: Run Hugo
uses: crazy-max/ghaction-hugo@v3
with:
version: latest
extended: false
args: --cleanDestinationDir --minify -D
-
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 }}