Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
name: All documents script
|
|
|
|
# **What it does**: Verifies that the all-documents script works.
|
|
# **Why we have it**: Code quality and sustainability.
|
|
# **Who does it impact**: docs-engineering
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'src/content-render/scripts/all-documents/**'
|
|
- 'package*.json'
|
|
- .github/workflows/all-documents.yml
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
all-documents-script:
|
|
if: github.repository == 'github/docs-internal'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out repo
|
|
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
|
|
- uses: ./.github/actions/node-npm-setup
|
|
|
|
- name: Run all-documents script
|
|
env:
|
|
NODE_ENV: production
|
|
run: |
|
|
echo "Help..."
|
|
npm run all-documents -- --help
|
|
|
|
echo ""
|
|
echo "Storing in a file (English only)"
|
|
npm run all-documents -- -o all-documents.json -l en
|
|
|
|
echo ""
|
|
echo "Look at the first 50 lines of the file..."
|
|
cat all-documents.json | jq | head -n 50
|
|
|
|
# We're essentially expecting it to not crash and fail.
|