Skip to content

Commit

Permalink
Merge pull request #4 from newrelic/develop
Browse files Browse the repository at this point in the history
keeping it up do date
  • Loading branch information
pachicodes authored Feb 3, 2021
2 parents 771a78e + 92b0aad commit c9ed3bc
Show file tree
Hide file tree
Showing 162 changed files with 1,466 additions and 3,583 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/build-cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build and cache site

on:
push:
branches:
- develop

jobs:
build:
name: Gatsby Build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 12

- name: Cache dependencies
id: yarn-cache
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }}

- name: Cache Gatsby build
uses: actions/cache@v2
with:
path: |
public
.cache
key: ${{ runner.os }}-gatsby-build-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-gatsby-build-
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile

- name: Gatsby build
run: yarn build:production --log-pages
env:
GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES: true
CI: true
99 changes: 99 additions & 0 deletions .github/workflows/validate-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Validate Pull Request

on:
pull_request:
branches:
- develop
- main

jobs:
build:
name: Gatsby Build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 12

- name: Cache dependencies
id: yarn-cache
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }}

- name: Cache Gatsby build
uses: actions/cache@v2
with:
path: |
public
.cache
key: ${{ runner.os }}-gatsby-build-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-gatsby-build-
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile

- name: Gatsby build
run: yarn build:production --log-pages
env:
GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES: true
CI: true

test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 12

- name: Cache dependencies
id: yarn-cache
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile

- name: Jest test
run: yarn test --passWithNoTests

lint:
name: Run Eslint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 12

- name: Cache dependencies
id: yarn-cache
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile

- name: Run Eslint
run: yarn lint
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# [1.35.0](https://github.com/newrelic/developer-website/compare/v1.34.0...v1.35.0) (2021-02-01)


### Features

* add jest tests to validation ([2970f60](https://github.com/newrelic/developer-website/commit/2970f60f9913b86096253c0a0c725f447b9da9f5))

# [1.34.0](https://github.com/newrelic/developer-website/compare/v1.33.0...v1.34.0) (2021-01-29)


### Bug Fixes

* add ngql to documentation ([8b6b5e3](https://github.com/newrelic/developer-website/commit/8b6b5e3a5f9ae9dfc3067e8ca00503f1ea3ad73e))
* ensure navigation api uses proper data for examples ([8facfa1](https://github.com/newrelic/developer-website/commit/8facfa17028aeb422056e0800c10dd4d92e30258))
* use https address for all assets loaded in gatsby ssr ([7f57332](https://github.com/newrelic/developer-website/commit/7f573323540b2fb371c68be08c9bca3c44c076b9))


### Features

* automatically create pages from the data in the component sdk ([4f7f9aa](https://github.com/newrelic/developer-website/commit/4f7f9aa7014dafd686d02dcdb741869c190db6f2))

# [1.33.0](https://github.com/newrelic/developer-website/compare/v1.32.1...v1.33.0) (2021-01-27)


Expand Down
118 changes: 79 additions & 39 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,51 @@
# Table of Contents

- [Table of Contents](#table-of-contents)
- [Guidelines for contributing](#guidelines-for-contributing)
- [Getting started](#getting-started)
- [Using multiple versions of Node](#using-multiple-versions-of-node)
- [Quick edits](#quick-edits)
- [Cloning vs Forking](#cloning-vs-forking)
- [Submitting a PR from a forked repo](#submitting-a-pr-from-a-forked-repo)
- [Submitting a PR from a cloned repo](#submitting-a-pr-from-a-cloned-repo)
- [Using the `develop` branch](#using-the-develop-branch)
- [Using Conventional Commits](#using-conventional-commits)
- [Use `chore`](#use-chore)
- [Use `fix`](#use-fix)
- [Use `feat`](#use-feat)
- [Draft PRs](#draft-prs)
- [Deploy previews with Amplify](#deploy-previews-with-amplify)
- [Style guide adherence](#style-guide-adherence)
- [Reusable components](#reusable-components)
- [Technical reference contribution guidelines](#technical-reference-contribution-guidelines)
- [Editing existing pages](#editing-existing-pages)
- [Creating new pages](#creating-new-pages)
- [Deleting pages](#deleting-pages)
- [New Relic guides](#new-relic-guides)
- [Purpose](#purpose)
- [Tips for writing guides](#tips-for-writing-guides)
- [Check for existing content](#check-for-existing-content)
- [Editing existing guides](#editing-existing-guides)
- [Creating new guides](#creating-new-guides)
- [Deleting guides](#deleting-guides)
- [Related Pages](#related-pages)
- [Updating navigation](#updating-navigation)
- [Example navigation change](#example-navigation-change)
- [EXISTING](#existing)
- [UPDATED](#updated)
- [Split testing and running experiments](#split-testing-and-running-experiments)
- [Step 1](#step-1)
- [Step 2](#step-2)
- [Step 3](#step-3)
- [Step 4](#step-4)
- [Step 5](#step-5)
<!-- TOC GFM -->

- [Guidelines for contributing](#guidelines-for-contributing)
- [Getting started](#getting-started)
- [Using multiple versions of Node](#using-multiple-versions-of-node)
- [Quick edits](#quick-edits)
- [Cloning vs Forking](#cloning-vs-forking)
- [Submitting a PR from a forked repo](#submitting-a-pr-from-a-forked-repo)
- [Submitting a PR from a cloned repo](#submitting-a-pr-from-a-cloned-repo)
- [Using the `develop` branch](#using-the-develop-branch)
- [Using Conventional Commits](#using-conventional-commits)
- [Use `chore`](#use-chore)
- [Use `fix`](#use-fix)
- [Use `feat`](#use-feat)
- [Draft PRs](#draft-prs)
- [Deploy previews with Amplify](#deploy-previews-with-amplify)
- [Style guide adherence](#style-guide-adherence)
- [Reusable components](#reusable-components)
- [Technical reference contribution guidelines](#technical-reference-contribution-guidelines)
- [Editing existing pages](#editing-existing-pages)
- [Creating new pages](#creating-new-pages)
- [Deleting pages](#deleting-pages)
- [New Relic guides](#new-relic-guides)
- [Purpose](#purpose)
- [Tips for writing guides](#tips-for-writing-guides)
- [Check for existing content](#check-for-existing-content)
- [Editing existing guides](#editing-existing-guides)
- [Creating new guides](#creating-new-guides)
- [Deleting guides](#deleting-guides)
- [Related Pages](#related-pages)
- [Updating navigation](#updating-navigation)
- [Example navigation change](#example-navigation-change)
- [EXISTING](#existing)
- [UPDATED](#updated)
- [Split testing and running experiments](#split-testing-and-running-experiments)
- [Step 1](#step-1)
- [Step 2](#step-2)
- [Step 3](#step-3)
- [Step 4](#step-4)
- [Step 5](#step-5)
- [Updating the documentation bundle](#updating-the-documentation-bundle)
- [Step 1: Update the release number in `gatsby-config`](#step-1-update-the-release-number-in-gatsby-config)
- [Step 2: Add any new APIs or components to our constants list](#step-2-add-any-new-apis-or-components-to-our-constants-list)
- [Step 3: Add any new APIs or components to the navigation](#step-3-add-any-new-apis-or-components-to-the-navigation)

<!-- /TOC -->

## Guidelines for contributing

Expand Down Expand Up @@ -372,3 +379,36 @@ A good metric:
### Step 5

Run the experiment and pick a winner!

## Updating the documentation bundle

Periodically we need to update the NR1 SDK bundle that we use to generate our
component documentation. In order to update the SDK, there are a few steps that
need to happen:

### Step 1: Update the release number in `gatsby-config`

We use a local plugin to source our documentation into GraphQL. This plugin has
some configuration that tells it what release number to use. [Update
`gatsby-config.js`](https://github.com/newrelic/developer-website/blob/ae42737f5f1cf556f3c44d864655c9a571739e28/gatsby-config.js#L161)
with the new release number to update.

### Step 2: Add any new APIs or components to our constants list

At the time of this writing, we rely on the 1st party documentation bundle to
power the developer docs. While the 1st party bundle provides many of the same
components/APIs, there are a few minor differences between the 1st and 3rd party
SDKs. To account for this, we list out the components we document on the site.
If there are any new components or APIs, [update the constants
list](https://github.com/newrelic/developer-website/blob/develop/plugins/gatsby-source-newrelic-sdk/src/constants.js)
with the new components. Pages will be automatically generated for each of
these.

Once we get a 3rd party bundle built for us, we should no longer need this step
as that will contain only 3rd party SDK documentation.

### Step 3: Add any new APIs or components to the navigation

If there are new APIs or components, we will want to list them in the navigation
so that a user can easily discover them. [Add an entry to `sidenav.json`](https://github.com/newrelic/developer-website/blob/develop/src/data/sidenav.json)
to get the new API/component in the nav.
Loading

0 comments on commit c9ed3bc

Please sign in to comment.