-
Notifications
You must be signed in to change notification settings - Fork 25
38 lines (32 loc) · 1.15 KB
/
doc_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Documentation Check
on:
pull_request:
branches:
- main
jobs:
check-docs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Install Homebrew
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH
- name: Install Sui using Homebrew
run: brew install sui
- name: Run documentation script
run: |
bash ./scripts/docgen.sh
shell: bash
- name: Check for changes in move-docs directories
run: |
output=$(git status --porcelain | grep '^?? packages/.*/move-docs/' || true)
echo "Filtered git status output: $output"
if [[ -n "$output" ]]; then
echo "Changes in move-docs directories are not committed. Please commit these changes before merging."
exit 1 # Fail the job to indicate documentation is not up-to-date
else
echo "No changes in move-docs directories. Documentation is up-to-date."
fi
shell: bash