Skip to content

Commit 566f941

Browse files
authored
Add docs-build-push github workflow (#765)
* Add docs-build-push github workflow * Remove slash from docs_source_path
1 parent 315063d commit 566f941

File tree

3 files changed

+37
-40
lines changed

3 files changed

+37
-40
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build and deploy (docs)
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
environment:
6+
description: 'Environment to deploy to'
7+
required: false
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+
jobs:
22+
call-docs-build-push:
23+
uses: nginxinc/docs-actions/.github/workflows/docs-build-push.yml@03a9a3808fcb77cd0c19d7fa5d59b25565dd1d6d # v1.0.2
24+
permissions:
25+
pull-requests: write # needed to write preview url comment to PR
26+
contents: read
27+
with:
28+
production_url_path: "/nginx-agent"
29+
preview_url_path: "/previews/nginx-agent"
30+
docs_source_path: "public/nginx-agent"
31+
docs_build_path: "./site"
32+
doc_type: "hugo"
33+
environment: ${{inputs.environment}}
34+
secrets:
35+
AZURE_CREDENTIALS: ${{secrets.AZURE_CREDENTIALS_DOCS}}
36+
AZURE_KEY_VAULT: ${{secrets.AZURE_KEY_VAULT_DOCS}}

site/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

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

5-
Docs are written in Markdown. We build the docs using [Hugo](https://gohugo.io) and host them on [Netlify](https://www.netlify.com/).
5+
Docs are written in Markdown. We build the docs using [Hugo](https://gohugo.io). 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

site/netlify.toml

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)