docs: make documentation checks self-contained
Docs security / security (pull_request) Successful in 6s
Docs verify / verify (pull_request) Successful in 11s
Conventional commits / commits (pull_request) Successful in 16s
Docs security / security (push) Successful in 9s
Docs verify / verify (push) Successful in 10s
Docs security / security (pull_request) Successful in 6s
Docs verify / verify (pull_request) Successful in 11s
Conventional commits / commits (pull_request) Successful in 16s
Docs security / security (push) Successful in 9s
Docs verify / verify (push) Successful in 10s
This commit was merged in pull request #14.
This commit is contained in:
@@ -8,39 +8,13 @@ on:
|
||||
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
|
||||
- name: Record checked revision
|
||||
run: git rev-parse HEAD
|
||||
- uses: https://github.com/actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: workspace/docs/.nvmrc
|
||||
node-version-file: .nvmrc
|
||||
- run: npm ci
|
||||
- name: Check Markdown and relative links
|
||||
run: npm run verify
|
||||
|
||||
Reference in New Issue
Block a user