From c655bdbe8e529789f6c65eb8a360e2bcee649fbb Mon Sep 17 00:00:00 2001 From: Alan Dooley Date: Tue, 26 Nov 2024 16:39:13 +0000 Subject: [PATCH 1/3] feat: Update documentation action, bump version for local testing This commit bumps the theme version for the documentation website, and updates the GitHub action used for deploying the website. The update allows you to specify what version of the theme to use for a deployment, which reduces the drift compared to relying on the local version. --- .github/workflows/docs-build-push.yml | 10 ++++++++-- site/go.mod | 2 +- site/go.sum | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docs-build-push.yml b/.github/workflows/docs-build-push.yml index f5f3529579..7092fb506b 100644 --- a/.github/workflows/docs-build-push.yml +++ b/.github/workflows/docs-build-push.yml @@ -1,4 +1,4 @@ -name: Build and deploy docs +name: Build and deploy documentation on: workflow_dispatch: inputs: @@ -12,6 +12,11 @@ on: - dev - staging - prod + hugo_theme_override: + description: "Hugo theme version (Leave blank for latest)" + required: false + default: "" + type: string pull_request: branches: - "*" @@ -43,7 +48,7 @@ jobs: if: ${{ github.event.repository.fork == false && needs.vars.outputs.azure_creds == 'true' }} uses: nginxinc/docs-actions/.github/workflows/docs-build-push.yml@9c59fab05a8131f4d691ba6ea2b6a119f3ef832a # v1.0.7 permissions: - pull-requests: write # needed to write preview url comment to PR + pull-requests: write contents: read with: production_url_path: "/nginx-gateway-fabric" @@ -52,6 +57,7 @@ jobs: docs_build_path: "./site" doc_type: "hugo" environment: ${{ inputs.environment }} + force_hugo_theme_version: ${{inputs.hugo_theme_override}} secrets: AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS_DOCS }} AZURE_KEY_VAULT: ${{ secrets.AZURE_KEY_VAULT_DOCS }} diff --git a/site/go.mod b/site/go.mod index 1e2b2ee840..4145091b7d 100644 --- a/site/go.mod +++ b/site/go.mod @@ -2,4 +2,4 @@ module github.com/nginxinc/nginx-gateway-fabric/site go 1.21 -require github.com/nginxinc/nginx-hugo-theme v0.41.22 // indirect +require github.com/nginxinc/nginx-hugo-theme v0.41.23 // indirect diff --git a/site/go.sum b/site/go.sum index 1819ea06c2..6bf2752ad6 100644 --- a/site/go.sum +++ b/site/go.sum @@ -1,2 +1,2 @@ -github.com/nginxinc/nginx-hugo-theme v0.41.22 h1:Gb/OLbpumNqp8vOPkZzO2GmgPDRd1yr2tWHWUBHg8BA= -github.com/nginxinc/nginx-hugo-theme v0.41.22/go.mod h1:DPNgSS5QYxkjH/BfH4uPDiTfODqWJ50NKZdorguom8M= +github.com/nginxinc/nginx-hugo-theme v0.41.23 h1:ddIfLF7BFd78qyIn3z5aReeC4BO/m9FH81d5S+al/6s= +github.com/nginxinc/nginx-hugo-theme v0.41.23/go.mod h1:DPNgSS5QYxkjH/BfH4uPDiTfODqWJ50NKZdorguom8M= From b05f6681c9a83de99edeb022fb3369e00a393d31 Mon Sep 17 00:00:00 2001 From: Alan Dooley Date: Tue, 26 Nov 2024 17:06:16 +0000 Subject: [PATCH 2/3] Update .github/workflows/docs-build-push.yml Co-authored-by: bjee19 <139261241+bjee19@users.noreply.github.com> --- .github/workflows/docs-build-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs-build-push.yml b/.github/workflows/docs-build-push.yml index 7092fb506b..d1ee5b146c 100644 --- a/.github/workflows/docs-build-push.yml +++ b/.github/workflows/docs-build-push.yml @@ -57,7 +57,7 @@ jobs: docs_build_path: "./site" doc_type: "hugo" environment: ${{ inputs.environment }} - force_hugo_theme_version: ${{inputs.hugo_theme_override}} + force_hugo_theme_version: ${{ inputs.hugo_theme_override }} secrets: AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS_DOCS }} AZURE_KEY_VAULT: ${{ secrets.AZURE_KEY_VAULT_DOCS }} From 97eba95ad530bb9b4f2d341ab37661b9562bcd41 Mon Sep 17 00:00:00 2001 From: Alan Dooley Date: Tue, 26 Nov 2024 17:08:08 +0000 Subject: [PATCH 3/3] feat: Re-add comment about preview URL --- .github/workflows/docs-build-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs-build-push.yml b/.github/workflows/docs-build-push.yml index d1ee5b146c..ffff97d78b 100644 --- a/.github/workflows/docs-build-push.yml +++ b/.github/workflows/docs-build-push.yml @@ -48,7 +48,7 @@ jobs: if: ${{ github.event.repository.fork == false && needs.vars.outputs.azure_creds == 'true' }} uses: nginxinc/docs-actions/.github/workflows/docs-build-push.yml@9c59fab05a8131f4d691ba6ea2b6a119f3ef832a # v1.0.7 permissions: - pull-requests: write + pull-requests: write # Required to add the preview URL comment contents: read with: production_url_path: "/nginx-gateway-fabric"