Move Documentation CI #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 that documentation is not up-to-date | |
else | |
echo "No changes in move-docs directories. Documentation is up-to-date." | |
fi | |
shell: bash |