-
Notifications
You must be signed in to change notification settings - Fork 96
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-push github workflow #2300
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2300 +/- ##
=======================================
Coverage 87.74% 87.74%
=======================================
Files 96 96
Lines 6830 6830
Branches 50 50
=======================================
Hits 5993 5993
Misses 780 780
Partials 57 57 ☔ View full report in Codecov by Sentry. |
site/README.md
Outdated
@@ -2,7 +2,8 @@ | |||
|
|||
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/). | |||
Documentation is written in Markdown, built using [Hugo](https://gohugo.io) with [nginx-hugo-theme](https://github.com/nginxinc/nginx-hugo-theme). Previews and deployments are handled by the [docs-actions](https://github.com/nginxinc/docs-actions?tab=readme-ov-file#docs-actions) workflow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion only: I'd like us as a group to "take ownership:"
Documentation is written in Markdown, built using [Hugo](https://gohugo.io) with [nginx-hugo-theme](https://github.com/nginxinc/nginx-hugo-theme). Previews and deployments are handled by the [docs-actions](https://github.com/nginxinc/docs-actions?tab=readme-ov-file#docs-actions) workflow. | |
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OTOH, if you want to stay consistent with what you've set up in similar site/README.md
files, I'm good with that too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense, I'll update the other PR I have up as well. 👍
branches: | ||
- "*" | ||
paths: | ||
- "docs/**" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our public docs live under the site/
directory. The docs/
directory is just developer docs in Github.
- prod | ||
pull_request: | ||
branches: | ||
- "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where will this publish to? Can we control which branches publish where?
For release branches (release-X.X
), we want the docs published to prod. Every other branch should only publish previews, not prod.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a PR is created that changes docs, a preview deploy will be made, and a URL will be added as a comment.
This does not deploy automatically, anywhere right now. You have to manually trigger the action, pick your branch, and pick your environment.
We're working on an update this week to allow users to specific a branch to autodeploy to an environment - I can hold off on this PR until that's ready if you like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh no that's fine, the preview on PRs is all that's needed. I think the only time that we want to actually publish is when docs are pushed to a release branch.
In netlify, we would first publish from the release branch after we pointed netlify at the branch (manual step that we did once the release was out), and then any docs changes in that branch going forward would be deployed automatically. I'm guessing that's the process you're referring to that you're working on?
Sidenote: it would be nice if we could have the doc preview exist in the actions list at the bottom of the PR instead of as a comment (just to save on the PR notifications and clutter in the comment section).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, exactly what we're working on at the moment 😄 . We're trying to mimic your old workflow from Netlify.
I like the idea of adding the url to the bottom of the PR, would need some extra parsing logic, but doable for sure 👍 .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM other than the linting errors that exist.
Great, will update tomorrow. |
Problem: NGINX docs have migrated off netlify Solution: This action will deploy to the new infrastructure, and remove Netlify configuration from this project.
55fc522
to
b6513ef
Compare
Closing in favor of #2351 |
Proposed changes
The NGINX docs site is migrating to self hosting. This PR adds support for a workflow to build, push, and provide PR previews. See: https://github.com/nginxinc/docs-actions
Checklist
Before creating a PR, run through this checklist and mark each as complete.