diff --git a/.github/actions/docs-build-push.yml b/.github/actions/docs-build-push.yml new file mode 100644 index 0000000000..aaf5a80c52 --- /dev/null +++ b/.github/actions/docs-build-push.yml @@ -0,0 +1,33 @@ +name: Build and deploy docs +on: + workflow_dispatch: + inputs: + environment: + description: 'Environment to deploy to' + required: true + default: 'preview' + type: choice + options: + - preview + - dev + - staging + - prod + pull_request: + branches: + - "*" + paths: + - "docs/**" + +jobs: + call-docs-build-push: + uses: nginxinc/docs-actions/.github/workflows/docs-build-push.yml@main + with: + production_url_path: "/nginx-ingress-controller" + preview_url_path: "/previews/nginx-ingress-controller" + docs_source_path: "public/nginx-ingress-controller" + docs_build_path: "./docs" + doc_type: "hugo" + environment: ${{inputs.environment}} + secrets: + AZURE_CREDENTIALS: ${{secrets.AZURE_CREDENTIALS}} + AZURE_KEY_VAULT: ${{secrets.AZURE_KEY_VAULT}} diff --git a/docs/README.md b/docs/README.md index 939630fdc9..5f9d31ab02 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2,7 +2,7 @@ This directory contains all of the user documentation for NGINX Ingress Controller, as well as the requirements for building and publishing the documentation. -Documentation is written in Markdown, built using [Hugo](https://gohugo.io) with [nginx-hugo-theme](https://github.com/nginxinc/nginx-hugo-theme), then deployed with [Netlify](https://www.netlify.com/). +Documentation is written in Markdown, built using [Hugo](https://gohugo.io) with [nginx-hugo-theme](https://github.com/nginxinc/nginx-hugo-theme). Previews and deployments are handled by the [docs-actions](https://github.com/nginxinc/docs-actions?tab=readme-ov-file#docs-actions) workflow. ## Setup