Skip to content

Commit 54e7239

Browse files
committed
add docs job
1 parent d818987 commit 54e7239

File tree

1 file changed

+45
-3
lines changed

1 file changed

+45
-3
lines changed

.github/workflows/compatibility-report.yml

+45-3
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,59 @@ jobs:
5454
path: compatibility.md
5555

5656
# Generate the new PR to update the doc in the repo.
57-
- run: |
58-
git config user.name $GITHUB_ACTOR
59-
git config user.email gh-actions-${GITHUB_ACTOR}@github.com
6057
- run: |
6158
rm -f status.log
6259
- uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e
6360
with:
61+
token: ${{ secrets.NODE_AGENT_GH_TOKEN || secrets.GITHUB_TOKEN }}
6462
title: "docs: Updated compatibility report"
6563
commit-message: "docs: Updated compatibility report"
6664
branch: "compatibility-report/auto-update"
6765
delete-branch: true
6866
base: main
6967
labels: "documentation"
7068

69+
docs:
70+
runs-on: ubuntu-latest
71+
if:
72+
github.event_name == 'push' ||
73+
(github.event.workflow_run && github.event.workflow_run.conclusion == 'success') ||
74+
(github.event_name == 'workflow_dispatch' &&
75+
(inputs.repo_target == 'docs' || inputs.repo_target == 'both'))
76+
env:
77+
DOCS_TARGET: src/content/docs/apm/agents/nodejs-agent/getting-started/compatibility-requirements-nodejs-agent.mdx
78+
steps:
79+
- uses: actions/checkout@v4
80+
with:
81+
path: agent
82+
- uses: actions/checkout@v4
83+
with:
84+
repository: newrelic/docs-website
85+
path: docs
86+
- uses: jaxxstorm/action-install-gh-release@71d17cb091aa850acb2a1a4cf87258d183eb941b
87+
with:
88+
repo: newrelic/newrelic-node-versions
89+
platform: linux
90+
arch: amd64
91+
cache: enable
92+
- run: |
93+
nrversions -v -r agent -R ${DOCS_TARGET} 2>docs-status.log
94+
95+
# Upload generated artifacts for potential debugging purposes.
96+
- uses: actions/upload-artifact@v4
97+
with:
98+
name: docs-status.log
99+
path: docs-status.log
100+
101+
# Generate the new PR to update the doc in the repo.
102+
- run: |
103+
rm -f docs-status.log
104+
- uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e
105+
with:
106+
token: ${{ secrets.NODE_AGENT_GH_TOKEN || secrets.GITHUB_TOKEN }}
107+
title: "docs: Updated Node.js agent compatibility report"
108+
commit-message: "docs: Updated Node.js agent compatibility report"
109+
branch: "nodejs-compatibility-report/auto-update"
110+
delete-branch: true
111+
base: develop
112+
labels: "documentation"

0 commit comments

Comments
 (0)