You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- If you'd like to make code contributions, or make content contributions locally, follow the contribution guidelines below.
47
47
48
48
## Getting started
@@ -135,7 +135,7 @@ If you plan on coordinating changes across several people, and feel your code is
135
135
use a shared working branch strategy.
136
136
137
137
1. create a new branch to collaborate with others via GIT and push that branch up to the remote repository. `git checkout -b shared-branch`
138
-
2. share that branch with others you are collaborating with. They'll need to run: `git pull origin shared-branch`
138
+
2. share that branch with others you are collaborating with. They'll need to run: `git pull origin shared-branch`
139
139
3. All contributors should keep that branch up to date by running `git pull origin develop` frequently.
140
140
4. Push all changes to the remote repository: `git push origin shared-branch`
141
141
5. Resolve any merge conflicts.
@@ -151,7 +151,7 @@ The `develop` and `main` branches have "Branch Protection" enabled in Github. In
151
151
152
152
You can review full Branch Protection details [here](https://docs.google.com/document/d/1O1SGS0i3OmPfvPhylpFe1CTMkE20889iAOF_cMFJ344/edit#heading=h.oh6pex9x0dx4), and check out a visual representation of the workflow below:
@@ -207,9 +207,15 @@ Feat is for major functional changes or additions to code.
207
207
git commit -m "feat(errors inbox): add new documents"
208
208
```
209
209
210
-
### Deploy previews with Gatsby Cloud
210
+
### Deploy previews with Netlify
211
211
212
-
PRs that are opened from a branch in this repo (not forks) will generate preview links on Gatsby Cloud automatically. Gatsby Cloud preview links are posted as comments on your pull request when they are done building. You can monitor the progress via the `Gatsby Build Service` job under the `Checks` section.
212
+
PRs that are opened from a branch in this repo will generate preview links on Netlify automatically.
213
+
214
+
`netlify bot` will leave a comment on your PR. You can monitor the progress via the comment details which include:
215
+
216
+
- The status of the preview build. (`processing`, `ready`, or `failed`)
217
+
- The commit that is being built or has failed.
218
+
- Once the build succeeds, the comment will update with a link to view the preview site.
@@ -285,9 +285,9 @@ When getting this content back from TV, we get back the same format that we sent
285
285
286
286
This can be tested via the `yarn serialize` && `yarn deserialize` scripts. These scripts are used by passing a file path to them and will output the result of the function to the terminal. ex: `yarn serialize path/to/file.mdx`.
287
287
288
-
# Gatsby Cloud
288
+
# Netlify sites
289
289
290
-
Although not listed on the diagrams above, Gatsby Cloud is where we host and deploy our site. Every time we merge into the main branch, Gatsby Cloud is triggered to build the latest updates from GitHub. It fetches the code from the main branch and builds the site. Once the site has passed the checks, it deploys the built site to [docs.newrelic.com](https://docs.newrelic.com). If the site fails to build, then the new version is not deployed and the engineers are notified.
290
+
Although not listed on the diagrams above, Netlify is where we host and deploy [docs.newrelic.com](https://docs.newrelic.com). We build each language on it's own Netlify site. Every time we merge into the main branch, Netlify is triggered to build the latest `EN`updates from GitHub by default. `trigger-i18n-merge` is a Github action that runs on each release PR to see if any files were modified in the `src/i18n/` directories. For each language with modifications, a build is also triggered in that Netlify site. It fetches the code from the main branch and builds that site with its translated content. If any of these sites fail to build, then the new version is not deployed and the engineers are notified via the Netlify Slack app integration.
Copy file name to clipboardExpand all lines: scripts/README.md
+21Lines changed: 21 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -71,6 +71,27 @@ It takes no arguments and will complete in about ~20min. It was created to be ru
71
71
72
72
This script runs upon making a PR to the develop branch via a github action (`.github/workflows/check-for-keys.yml`). It scans all files, save one (`gatsby-config.js`), for any potential New Relic API keys based on a list of regex. It also scans all git commit history for any commits made in a PR to develop, looks at the diff for all said commits and scans those for API keys as well. This is intended to ensure no API keys are committed to the docs site or git history.
73
73
74
+
## actions/generate-whats-new-ids.js
75
+
76
+
This script generates id's for What's new posts upon opening a PR to `main` in a github action (`.github/workflows/update-whats-new-ids.yml`). These are referenced by the NR One product from `/api/nr1/content/nr1-announcements.json` and used to show What's new posts to customers within the UI.
77
+
78
+
When the action runs, it checks out `develop` and compares the content in `src/data/whats-new-ids.json` vs posts in `src/content/whats-new/`. If there is a new posts not in the json, the script adds a new item to the array containing the path to the post and a new generated id:
79
+
80
+
```json
81
+
"/whats-new/2020/09/new-post-slug": "12345",
82
+
```
83
+
84
+
> [!IMPORTANT]
85
+
> The changes made to the json are committed to **`develop`** and will not be published and available to the NR One UI until a second release is merged that contains the updated json!
86
+
87
+
What's new workflow from new `.mdx` page to rendering in Product UI:
88
+
89
+
1. New post is merged into `develop`
90
+
2. Release PR #1 is opened to `main`
91
+
3.`update-whats-new-ids.yml` runs > adds post path & id to json > commits changes to ``develop`
92
+
4. Release PR #2 is released and `/api/nr1/content/nr1-announcements.json` endpoint is updated
93
+
5. Product service picks up changes and is able to display new post in UI
94
+
74
95
## addRemoveRedirects.js
75
96
76
97
This script has two options: one will add redirects for all files' current paths in a given directory (including all sub-directories), or it will remove any redirects of a file's current path in a given directory.
Copy file name to clipboardExpand all lines: src/content/docs/agile-handbook/heroing/what-is-a-hero.mdx
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ The bulk of your time is generally spent reviewing and approving PRs from non-wr
54
54
***If it's a deeper edit, or a completely new doc**, give it an in-depth review. The [Docs site edit checklist](/docs/style-guide/processes-procedures/docs-site-edit-checklist/) is a great resource here. If it's a really complex or large edit, consider creating a Jira ticket for an upcoming sprint to give it the review time it needs.
55
55
***If it's a What's new post**, pay special attention to frontmatter, links, and image formatting. This content follows marketing style, so it doesn't need to fully match our style guidelines for things like capitalization.
56
56
***If it's a release note**, focus your review on formatting and basic style, and ensuring the release note itself is helpful. Release notes don't need to follow all docs style guidelines religiously.
57
-
4. Preview your change in Gatsby Cloud or locally.
Copy file name to clipboardExpand all lines: src/content/docs/style-guide/writing-docs/writer-workflow/github-troubleshooting.mdx
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ This command returns more information about the error than the normal Gatsby out
35
35
title="Example"
36
36
>
37
37
38
-
Let's pretend I've made a changes to multiple docs in my branch. When I try to either run the site locally or access the Gatsby Cloud build, I get the following error:
38
+
Let's pretend I've made a changes to multiple docs in my branch. When I try to either run the site locally or access the Netlify build, I get the following error:
39
39
40
40
```
41
41
Unexpected character = (U+003D) before name, expected a character that can start a name, such as a letter, $, or _/usr/src/app/www/src/content/docs/new-relic-solutions/observability-maturity/uptime-performance-reliability/aqm-implementation-guide.mdx: Unexpected character = (U+003D) before name, expected a character that can start a name, such as a letter, $, or _
0 commit comments