From 2123b846a580e04bbf4015339040bf4d357c37ca Mon Sep 17 00:00:00 2001 From: Danielle De Leo Date: Tue, 16 Jul 2024 10:49:54 -0400 Subject: [PATCH 1/4] Add GitHub workflow for docs deployments --- .github/actions/docs-build-push.yml | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/actions/docs-build-push.yml diff --git a/.github/actions/docs-build-push.yml b/.github/actions/docs-build-push.yml new file mode 100644 index 0000000000..8a19e0ddb9 --- /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}} \ No newline at end of file From 924ea1d1ae81359afcc0b2962f3ec0e2fbb86173 Mon Sep 17 00:00:00 2001 From: Danielle De Leo Date: Tue, 16 Jul 2024 11:26:36 -0400 Subject: [PATCH 2/4] Remove Netlify reference from readme --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index 939630fdc9..eb12de763d 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). ## Setup From ae41c0523bba3e7107acfaf84f0428129df7ebdc Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2024 15:32:15 +0000 Subject: [PATCH 3/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .github/actions/docs-build-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/docs-build-push.yml b/.github/actions/docs-build-push.yml index 8a19e0ddb9..aaf5a80c52 100644 --- a/.github/actions/docs-build-push.yml +++ b/.github/actions/docs-build-push.yml @@ -30,4 +30,4 @@ jobs: environment: ${{inputs.environment}} secrets: AZURE_CREDENTIALS: ${{secrets.AZURE_CREDENTIALS}} - AZURE_KEY_VAULT: ${{secrets.AZURE_KEY_VAULT}} \ No newline at end of file + AZURE_KEY_VAULT: ${{secrets.AZURE_KEY_VAULT}} From 2bc9176fb30bea20c870a46c84c309ad0e1b0ea2 Mon Sep 17 00:00:00 2001 From: Danielle De Leo Date: Wed, 17 Jul 2024 08:03:59 -0400 Subject: [PATCH 4/4] Add explanation and link to docs-actions workflow --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index eb12de763d..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). +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