Skip to content

Commit b23a4de

Browse files
committed
Add docs build and deploy github action
Problem: NGINX docs have migrated off netlify Solution: This action will deploy to the new infrastructure, and remove Netlify configuration from this project.
1 parent 6e26763 commit b23a4de

File tree

3 files changed

+41
-36
lines changed

3 files changed

+41
-36
lines changed

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

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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+
- "site/**"
20+
21+
permissions:
22+
contents: read
23+
24+
jobs:
25+
call-docs-build-push:
26+
if: ${{ github.event.repository.fork == false }}
27+
uses: nginxinc/docs-actions/.github/workflows/docs-build-push.yml@03a9a3808fcb77cd0c19d7fa5d59b25565dd1d6d # v1.0.2
28+
permissions:
29+
pull-requests: write # needed to write preview url comment to PR
30+
contents: read
31+
with:
32+
production_url_path: "/nginx-gateway-fabric/"
33+
preview_url_path: "/previews/nginx-gateway-fabric/"
34+
docs_source_path: "public/nginx-gateway-fabric"
35+
docs_build_path: "./site"
36+
doc_type: "hugo"
37+
environment: ${{ inputs.environment }}
38+
secrets:
39+
AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS_DOCS }}
40+
AZURE_KEY_VAULT: ${{ secrets.AZURE_KEY_VAULT_DOCS }}

site/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 Gateway Fabric, 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+
We write our documentation in Markdown. We build it with [Hugo](https://gohugo.io) and our custom [NGINX Hugo theme](https://github.com/nginxinc/nginx-hugo-theme). We set up previews and deployments using our [docs-actions](https://github.com/nginxinc/docs-actions?tab=readme-ov-file#docs-actions) workflow.
66

77
## Setup
88

site/netlify.toml

-35
This file was deleted.

0 commit comments

Comments
 (0)