Skip to content

Commit

Permalink
Add docs build and deploy github action
Browse files Browse the repository at this point in the history
Problem: NGINX docs have migrated off netlify

Solution: This action will deploy to the new infrastructure, and
remove Netlify configuration from this project.
  • Loading branch information
sjberman committed Aug 8, 2024
1 parent 6e26763 commit b23a4de
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 36 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/docs-build-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
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:
- "site/**"

permissions:
contents: read

jobs:
call-docs-build-push:
if: ${{ github.event.repository.fork == false }}
uses: nginxinc/docs-actions/.github/workflows/docs-build-push.yml@03a9a3808fcb77cd0c19d7fa5d59b25565dd1d6d # v1.0.2
permissions:
pull-requests: write # needed to write preview url comment to PR
contents: read
with:
production_url_path: "/nginx-gateway-fabric/"
preview_url_path: "/previews/nginx-gateway-fabric/"
docs_source_path: "public/nginx-gateway-fabric"
docs_build_path: "./site"
doc_type: "hugo"
environment: ${{ inputs.environment }}
secrets:
AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS_DOCS }}
AZURE_KEY_VAULT: ${{ secrets.AZURE_KEY_VAULT_DOCS }}
2 changes: 1 addition & 1 deletion site/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 Gateway Fabric, 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/).
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.

## Setup

Expand Down
35 changes: 0 additions & 35 deletions site/netlify.toml

This file was deleted.

0 comments on commit b23a4de

Please sign in to comment.