diff --git a/.github/workflows/docs-build-push.yml b/.github/workflows/docs-build-push.yml new file mode 100644 index 00000000..df705cb0 --- /dev/null +++ b/.github/workflows/docs-build-push.yml @@ -0,0 +1,37 @@ +name: Build and deploy docs (unit.nginx.org) +on: + workflow_dispatch: + inputs: + environment: + description: 'Environment to deploy to' + required: true + default: 'preview' + type: choice + options: + - preview + - dev + - staging + - prod + pull_request: + branches: + - "*" + +permissions: + contents: read + +jobs: + call-docs-build-push: + uses: nginxinc/docs-actions/.github/workflows/docs-build-push.yml@main + permissions: + pull-requests: write # needed to write preview url comment to PR + contents: read + with: + production_url_path: "" + preview_url_path: "/previews/unit" + docs_source_path: "deploy" + docs_build_path: "." + doc_type: "sphinx" + environment: ${{inputs.environment}} + secrets: + AZURE_CREDENTIALS: ${{secrets.AZURE_CREDENTIALS_DOCS}} + AZURE_KEY_VAULT: ${{secrets.AZURE_KEY_VAULT_DOCS}} diff --git a/README.md b/README.md index 8771fb24..de0d579d 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,12 @@ pip install -r requirements.txt make serve ``` +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. + +## Deployment + +See the [`docs-actions` README](https://github.com/nginxinc/docs-actions/tree/main?tab=readme-ov-file#docs-actions). + ## Contributing Pull requests are welcome. For major changes, please open an issue diff --git a/netlify.toml b/netlify.toml deleted file mode 100644 index 18d66255..00000000 --- a/netlify.toml +++ /dev/null @@ -1,22 +0,0 @@ -# Used by Netlify for redirects. Lines with status code 200 are proxied and -# rewritten by Netlify. - -# From the previous nginx.conf -[[redirects]] - from = "/integration" - to = "/howto/integration" - status = 301 - -# The directory index is redirected to the new canonical location -[[redirects]] - from = "/download" - to = "https://sources.nginx.org/unit/" - status = 301 - headers = {X-From = "Netlify"} - -# To keep old download links alive, we proxy direct requests for specific files -[[redirects]] - from = "/download/*" - to = "https://sources.nginx.org/unit/:splat" - status = 200 - headers = {X-From = "Netlify"}