Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub workflow for docs deployments #6027

Merged
merged 5 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/actions/docs-build-push.yml
Original file line number Diff line number Diff line change
@@ -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}}
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down