name: Documentation on: # So we can trigger manually if needed workflow_dispatch: # To confirm any changes to docs build successfully, without deploying them pull_request: # Pushes to branches do the full build + deployment push: branches: - main - "release-*" paths: - "cmd/**" - "docs/**" - "pkg/**" - ".github/workflows/docs-gen-and-push.yaml" permissions: contents: write concurrency: group: ${{ github.workflow }} jobs: generate-and-push: name: Generate and push runs-on: ubuntu-latest steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # tag=v7.0.1 - run: git fetch origin gh-pages - run: git fetch origin '+refs/tags/v*:refs/tags/v*' --no-tags - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # tag=v7.0.0 with: go-version: v1.26.4 cache: true - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 #tag=v7.0.0 with: python-version: "3.10" cache: "pip" # mike does not support giving CLI flags for mkdocs, but we also do not # want to permanently enable strict mode, so here we enable it just for this # task - run: | echo "strict: true" >> docs/mkdocs.yml - run: make generate-cli-docs generate-api-docs deploy-docs