Skip to content

Commit

Permalink
chore: sync scripts/ and docs/ tooling with latest
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys authored and wraithgar committed Feb 15, 2023
1 parent 2f0b4df commit 601fb55
Show file tree
Hide file tree
Showing 24 changed files with 2,047 additions and 911 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/ci-npmcli-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,45 @@ jobs:
- name: Check Git Status
if: matrix && matrix.platform.os != 'windows-latest'
run: node scripts/git-dirty.js

compare-docs:
name: Compare Docs
if: github.repository_owner == 'npm' && github.event_name == 'pull_request'
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Git User
run: |
git config --global user.email "[email protected]"
git config --global user.name "npm CLI robot"
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: npm
- name: Reset Deps
run: node . run resetdeps
- name: Build Docs
run: |
node . run build -w docs
mv man/ man-update/
mv docs/output/ docs/output-update/
mv docs/content/ docs/content-update/
- name: Get Current Docs
run: |
git clean -fd
git checkout ${{ github.event.pull_request.base.ref }}
node . run resetdeps
node . run build -w docs
- name: Diff Man
run: diff -r --color=always man/ man-update/ || true
- name: Diff HTML
run: diff -r --color=always docs/output/ docs/output-update/ || true
- name: Diff Markdown
run: diff -r --color=always docs/content/ docs/content-update/ || true
4 changes: 3 additions & 1 deletion .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,8 @@ jobs:
- name: Reset Deps
run: node . run resetdeps
- name: Pack
env:
SMOKE_PUBLISH_NPM: 1
run: |
NPM_VERSION="$(node . --version)-$GITHUB_SHA.0"
node . version $NPM_VERSION --ignore-scripts
Expand All @@ -291,7 +293,7 @@ jobs:
node scripts/remove-files.js
# call installed npm instead of local source since we are testing
# the packed tarball that we just installed globally
SMOKE_PUBLISH_NPM=1 npm test -w smoke-tests --ignore-scripts
npm test -w smoke-tests --ignore-scripts
- name: Conclude Check
uses: LouisBrunner/[email protected]
if: steps.check.outputs.check_id && always()
Expand Down
Loading

0 comments on commit 601fb55

Please sign in to comment.