Skip to content

Commit 7e0752e

Browse files
see7elucaaamaral
andauthored
feat(docussaurus): upgrade Docussaurus (#11)
Signed-off-by: Lucas Amaral <[email protected]> Signed-off-by: conradogobato <[email protected]> Signed-off-by: Gabryel Nóbrega <[email protected]> Co-authored-by: Lucas Amaral <[email protected]>
1 parent 0f05784 commit 7e0752e

File tree

671 files changed

+41242
-14994
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

671 files changed

+41242
-14994
lines changed

.github/scripts/check_doc_references.py

-77
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"ignorePatterns": [
3+
{
4+
"pattern": "^https?://(localhost|127\\.0\\.0\\.1)(:\\d+)?(/.*)?$"
5+
},
6+
{
7+
"pattern": "^https?://controller\\.url\\.sample(:\\d+)?(/.*)?$"
8+
}
9+
]
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"ignorePatterns": [
3+
{
4+
"pattern": "^(?!http).*"
5+
},
6+
{
7+
"pattern": ".*%2F*"
8+
},
9+
{
10+
"pattern": ".*127.0.0.1.*"
11+
},
12+
{
13+
"pattern" : ".*localhost.*"
14+
},
15+
{
16+
"pattern": "^https://controller.url.sample:9443"
17+
},
18+
{
19+
"pattern": "^https://nms.yourdomain.com"
20+
},
21+
{
22+
"pattern" : "^https://your-org.nms.yourdomain.com"
23+
},
24+
{
25+
"pattern" : "https://magma.github.io/magma/docs/orc8r/rds_upgrade#logs-and-validation"
26+
},
27+
{
28+
"pattern" : "https://github.com/fbcinternal/ens_magma/tree/master/spirent_automation"
29+
},
30+
{
31+
"pattern" : "https://github.com/magma/ci-infra/blob/master/bazel/remote_caching/Readme.md"
32+
},
33+
{
34+
"pattern" : "https://github.com/magma/security/issues"
35+
},
36+
{
37+
"pattern" : "https://github.com/dysinger/basebox"
38+
},
39+
{
40+
"pattern" : "https://docs.virtlet.cloud/user-guide/real-cluster/"
41+
},
42+
{
43+
"pattern" : "^https://www.etsi.org.*pdf"
44+
},
45+
{
46+
"pattern" : "https://core.ac.uk/download/pdf/322886318.pdf"
47+
},
48+
{
49+
"pattern" : "http://automation.fbmagma.ninja/"
50+
},
51+
{
52+
"pattern" : "http://ens-spirent-test-summary.com.s3-us-west-1.amazonaws.com/sanity/hilsanitypass.svg"
53+
},
54+
{
55+
"pattern" : "https://fb.quip.com/4tmUAtlox4Oy"
56+
}
57+
]
58+
}

.github/workflows/docs-fix.yml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Copyright 2022 The Magma Authors.
2+
#
3+
# This source code is licensed under the BSD-style license found in the
4+
# LICENSE file in the root directory of this source tree.
5+
#
6+
# Unless required by applicable law or agreed to in writing, software
7+
# distributed under the License is distributed on an "AS IS" BASIS,
8+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
# See the License for the specific language governing permissions and
10+
# limitations under the License.
11+
12+
# owner: @magma/approvers-infra
13+
# purpose: Fixes the documentation if any issue is found during tests
14+
# remediation:
15+
16+
name: Docs Fix (Triggered on Check Failure)
17+
18+
on:
19+
workflow_run:
20+
workflows: ["Docs Check"]
21+
types:
22+
- completed
23+
24+
jobs:
25+
only_if_failed:
26+
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout code
30+
uses: actions/checkout@v4
31+
32+
- name: Setup Node
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: '18'
36+
37+
- name: Setup Python (if needed)
38+
uses: actions/setup-python@v5
39+
with:
40+
python-version: '3.8'
41+
42+
- name: Install deps
43+
run: yarn install --frozen-lockfile
44+
45+
- name: Run precommit fix
46+
run: make -C readmes precommit_fix
47+
48+
- name: Show diff after fix
49+
run: git diff --color
50+
51+
- name: Upload patch
52+
run: |
53+
git diff > docs_fixes.patch
54+
continue-on-error: true
55+
56+
- name: Upload auto-fix patch
57+
uses: actions/upload-artifact@v4
58+
with:
59+
name: auto-fix-patch
60+
path: docs_fixes.patch

.github/workflows/docs-test.yml

+113
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# Copyright 2022 The Magma Authors.
2+
#
3+
# This source code is licensed under the BSD-style license found in the
4+
# LICENSE file in the root directory of this source tree.
5+
#
6+
# Unless required by applicable law or agreed to in writing, software
7+
# distributed under the License is distributed on an "AS IS" BASIS,
8+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
# See the License for the specific language governing permissions and
10+
# limitations under the License.
11+
12+
# owner: @magma/approvers-infra
13+
# purpose: Check the documentation changes for issues and formatting errors
14+
# remediation:
15+
---
16+
name: Docs Check
17+
18+
on:
19+
pull_request:
20+
branches: [ main ]
21+
push:
22+
branches: [ main ]
23+
24+
jobs:
25+
docusaurus-test:
26+
name: Docusaurus Build & Log
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v4
30+
- uses: actions/setup-node@v4
31+
with:
32+
node-version: '18'
33+
34+
- name: Install dependencies
35+
run: |
36+
cd docusaurus/
37+
yarn install --frozen-lockfile
38+
39+
- name: Build and test Docusaurus
40+
run: |
41+
cd docusaurus/
42+
yarn test
43+
44+
- name: Verify build output
45+
run: |
46+
cd docusaurus/
47+
test -d build && echo "✅ Build successful"
48+
49+
markdown-lint:
50+
name: Markdown Format Check
51+
runs-on: ubuntu-latest
52+
steps:
53+
- uses: actions/checkout@v4
54+
- name: Install markdownlint-cli
55+
run: npm install -g markdownlint-cli
56+
- name: Run markdownlint
57+
run: markdownlint "docs/**/*.md" "readmes/**/*.md"
58+
59+
translation-consistency:
60+
name: Translation Consistency Check
61+
runs-on: ubuntu-latest
62+
steps:
63+
- uses: actions/checkout@v4
64+
with:
65+
fetch-depth: 0
66+
- name: Grant execute permissions and convert script file
67+
run: |
68+
chmod +x ./.github/workflows/scripts/check_translations.sh
69+
- name: Check Translation Consistency
70+
run: |
71+
./.github/workflows/scripts/check_translations.sh --debug
72+
shell: bash
73+
74+
id-filename-sync:
75+
name: Docusaurus ID & Filename Sync
76+
runs-on: ubuntu-latest
77+
steps:
78+
- uses: actions/checkout@v4
79+
- name: Grant execute permissions to scripts and convert script file
80+
run: |
81+
chmod +x ./.github/workflows/scripts/check_id_matches_filename.sh
82+
- name: Check ID matches filename
83+
run: |
84+
./.github/workflows/scripts/check_id_matches_filename.sh --debug
85+
86+
check-symlinks:
87+
name: Broken Symlinks
88+
runs-on: ubuntu-latest
89+
steps:
90+
- uses: actions/checkout@v4
91+
- name: Check for broken symlinks in docusaurus/
92+
working-directory: ${{ github.workspace }}/docusaurus
93+
run: |
94+
BROKEN=$(find . -xtype l)
95+
if [ -n "$BROKEN" ]; then
96+
echo "❌ Broken symlinks found:"
97+
echo "$BROKEN"
98+
exit 1
99+
else
100+
echo "✅ No broken symlinks found in ./docusaurus."
101+
fi
102+
103+
markdown-link-check:
104+
name: Markdown URL Check
105+
runs-on: ubuntu-latest
106+
steps:
107+
- uses: actions/checkout@v3
108+
- uses: gaurav-nelson/github-action-markdown-link-check@v1
109+
with:
110+
use-quiet-mode: 'yes'
111+
use-verbose-mode: 'yes'
112+
config-file: '.github/workflows/config/markdown.links.config.json'
113+
folder-path: './docusaurus/docs'

0 commit comments

Comments
 (0)