mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
* Add vitepress tree * Update existing workflows so they dont trigger on changes in the docs path * Add nojekyll, package.json, LICENCE etc * Add crowdin docs upload/download scripts * Add docs flaw checker workflows * Used docs prefix for docs workflows * Crowdin obvious fixes * ci: docs move to self hosted runner runs on a beefy server for faster builds Signed-off-by: Ramon Roche <mrpollo@gmail.com> * ci: don't run build action for docs or ci changes Signed-off-by: Ramon Roche <mrpollo@gmail.com> * ci: update runners Signed-off-by: Ramon Roche <mrpollo@gmail.com> * Add docs/en * Add docs assets and scripts * Fix up editlinks to point to PX4 sources * Download just the translations that are supported * Add translation sources for zh, uk, ko * Update latest tranlsation and uorb graphs * update vitepress to latest --------- Signed-off-by: Ramon Roche <mrpollo@gmail.com> Co-authored-by: Ramon Roche <mrpollo@gmail.com>
75 lines
2.3 KiB
YAML
75 lines
2.3 KiB
YAML
name: Docs - Check for flaws in PX4 Guide Source
|
|
# So far:
|
|
# Modifications of translations files
|
|
# Broken internal links
|
|
|
|
on:
|
|
pull_request_target:
|
|
types: [opened, edited, synchronize]
|
|
paths:
|
|
- 'docs/en/**'
|
|
|
|
jobs:
|
|
check_flaws:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
|
|
- name: Install Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '16'
|
|
|
|
- name: Create logs directory
|
|
run: |
|
|
mkdir logs
|
|
|
|
- name: Get changed english files
|
|
id: get_changed_markdown_english
|
|
uses: tj-actions/changed-files@v35.9.2
|
|
with:
|
|
json: true
|
|
base_sha: "${{ github.event.pull_request.base.sha }}"
|
|
sha: "${{ github.event.pull_request.head.sha }}"
|
|
# Below are used to output files to a directory. May use in flaw checker.
|
|
# write_output_files: true
|
|
# output_dir: "./logs"
|
|
files: |
|
|
docs/en/**/*.md
|
|
|
|
- name: Save JSON file containing files to link check
|
|
run: |
|
|
echo "${{ steps.get_changed_markdown_english.outputs.all_changed_files }}"
|
|
echo "${{ steps.get_changed_markdown_english.outputs.all_changed_files }}" > ./logs/prFiles.json
|
|
|
|
- name: Run link checker
|
|
id: link-check
|
|
run: |
|
|
npm -g install markdown_link_checker_sc@0.0.134
|
|
markdown_link_checker_sc -r ${{ github.workspace }} -d en -f ./docs/logs/prFiles.json -i assets -u docs.px4.io/main/ > ./docs/logs/errorsFilteredByPrPages.md
|
|
mkdir -p ./pr
|
|
cp ./docs/logs/errorsFilteredByPrPages.md ./pr/errorsFilteredByPrPages.md
|
|
|
|
- name: Read errorsFilteredByPrPages.md file
|
|
id: read-errors-by-page
|
|
uses: juliangruber/read-file-action@v1
|
|
with:
|
|
path: ./logs/errorsFilteredByPrPages.md
|
|
|
|
- name: Echo Errors by Page
|
|
run: echo "${{ steps.read-errors-by-page.outputs.content }}"
|
|
|
|
- name: Save PR number
|
|
env:
|
|
PR_NUMBER: ${{ github.event.number }}
|
|
run: |
|
|
#mkdir -p ./pr
|
|
echo $PR_NUMBER > ./pr/pr_number
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: pr_number
|
|
path: pr/
|