Skip to content

Commit d250c08

Browse files
Add GitHub workflow for docs deployments (#6027)
1 parent e316fdd commit d250c08

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

.github/actions/docs-build-push.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build and deploy docs
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
environment:
6+
description: 'Environment to deploy to'
7+
required: true
8+
default: 'preview'
9+
type: choice
10+
options:
11+
- preview
12+
- dev
13+
- staging
14+
- prod
15+
pull_request:
16+
branches:
17+
- "*"
18+
paths:
19+
- "docs/**"
20+
21+
jobs:
22+
call-docs-build-push:
23+
uses: nginxinc/docs-actions/.github/workflows/docs-build-push.yml@main
24+
with:
25+
production_url_path: "/nginx-ingress-controller"
26+
preview_url_path: "/previews/nginx-ingress-controller"
27+
docs_source_path: "public/nginx-ingress-controller"
28+
docs_build_path: "./docs"
29+
doc_type: "hugo"
30+
environment: ${{inputs.environment}}
31+
secrets:
32+
AZURE_CREDENTIALS: ${{secrets.AZURE_CREDENTIALS}}
33+
AZURE_KEY_VAULT: ${{secrets.AZURE_KEY_VAULT}}

docs/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This directory contains all of the user documentation for NGINX Ingress Controller, as well as the requirements for building and publishing the documentation.
44

5-
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/).
5+
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.
66

77
## Setup
88

0 commit comments

Comments
 (0)