Skip to content

Commit 03edaaa

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

File tree

3 files changed

+42
-22
lines changed

3 files changed

+42
-22
lines changed

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

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
permissions:
25+
pull-requests: write # needed to write preview url comment to PR
26+
contents: read
27+
with:
28+
production_url_path: ""
29+
preview_url_path: "/previews/unit"
30+
docs_source_path: "deploy"
31+
docs_build_path: "."
32+
doc_type: "sphinx"
33+
environment: ${{inputs.environment}}
34+
secrets:
35+
AZURE_CREDENTIALS: ${{secrets.AZURE_CREDENTIALS}}
36+
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

netlify.toml

-22
This file was deleted.

0 commit comments

Comments
 (0)