Skip to content

Commit 4808b9c

Browse files
committed
Add GitHub Action for site and preview deployments
1 parent 397c372 commit 4808b9c

File tree

4 files changed

+72
-22
lines changed

4 files changed

+72
-22
lines changed

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

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build and deploy docs (unit.nginx.org)
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+
- "docs/**"
20+
21+
jobs:
22+
call-docs-build-push:
23+
uses: nginxinc/docs-actions/.github/workflows/docs-build-push.yml@main
24+
with:
25+
production_url_path: ""
26+
preview_url_path: "/previews/unit"
27+
docs_source_path: "deploy"
28+
docs_build_path: "."
29+
doc_type: "sphinx"
30+
environment: ${{inputs.environment}}
31+
secrets:
32+
AZURE_CREDENTIALS: ${{secrets.AZURE_CREDENTIALS}}
33+
AZURE_KEY_VAULT: ${{secrets.AZURE_KEY_VAULT}}

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ pip install -r requirements.txt
1717
make serve
1818
```
1919

20+
Commits in any branch associated with a Pull Request, if made by a maintainer, will automatically deploy a preview site. A comment with a link to the preview will show up in the PR.
21+
22+
## Deployment
23+
24+
See the [`docs-actions` README](https://github.com/nginxinc/docs-actions/tree/main?tab=readme-ov-file#docs-actions).
25+
2026
## Contributing
2127

2228
Pull requests are welcome. For major changes, please open an issue

docs-build-push.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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+
- "docs/**"
20+
21+
jobs:
22+
call-docs-build-push:
23+
uses: nginxinc/docs-actions/.github/workflows/docs-build-push.yml@main
24+
with:
25+
production_url_path: "/nginx-ingress-controller"
26+
preview_url_path: "/previews/nginx-ingress-controller"
27+
docs_source_path: "public/nginx-ingress-controller"
28+
docs_build_path: "./docs"
29+
doc_type: "hugo"
30+
environment: ${{inputs.environment}}
31+
secrets:
32+
AZURE_CREDENTIALS: ${{secrets.AZURE_CREDENTIALS}}
33+
AZURE_KEY_VAULT: ${{secrets.AZURE_KEY_VAULT}}

netlify.toml

-22
This file was deleted.

0 commit comments

Comments
 (0)