name: Docs verify on: push: branches: ['**'] pull_request: jobs: verify: runs-on: ubuntu-latest defaults: run: working-directory: workspace/docs steps: - uses: https://github.com/actions/checkout@v4 with: path: workspace/docs - name: Checkout compatible peer revisions env: SOURCE_BRANCH: ${{ github.head_ref || github.ref_name }} TARGET_BRANCH: ${{ github.base_ref || github.ref_name }} run: | set -eu for repo in main frontend backend specs; do ref=develop case "$SOURCE_BRANCH:$TARGET_BRANCH" in release/*:*|*:main) ref=$(jq -er --arg repo "$repo" '.[$repo]' .ci/refs.json) printf '%s\n' "$ref" | grep -Eq '^[0-9a-f]{40}$' ;; esac target="../$repo" if [ "$repo" = main ]; then target=..; fi git init "$target" git -C "$target" remote add origin "https://git.personal.ksv741.ru/WealthLedger/$repo.git" git -C "$target" fetch --depth 1 origin "$ref" git -C "$target" checkout --detach FETCH_HEAD git -C "$target" rev-parse HEAD done git rev-parse HEAD - uses: https://github.com/actions/setup-node@v4 with: node-version-file: workspace/docs/.nvmrc - run: npm ci - name: Check Markdown and relative links run: npm run verify