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 docs build and deploy github action #2351

Merged
merged 3 commits into from
Aug 9, 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
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
bjee19 marked this conversation as resolved.
Show resolved Hide resolved
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.

Loading