Skip to content

Commit

Permalink
ci: Moved doc setup to separate script (#3339)
Browse files Browse the repository at this point in the history
Since there seems to be some problem with the doc setup on the GitHub
runners, let's try running it as a separate script.
  • Loading branch information
spydon authored and luanpotter committed Oct 15, 2024
1 parent ce23d72 commit 00367bf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
9 changes: 1 addition & 8 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,7 @@ scripts:
description: Run dartdoc checks for all packages.

doc-setup:
steps:
- 'echo Checking python version:'
- 'python3 --version && python3 -c "import sys; sys.exit(0 if sys.version_info >= (3,8) else 2)" || (echo "Error: Python 3.8+ is required" && exit 1)'
- 'echo Installing required python modules:'
- 'python3 -m pip install -r "$MELOS_ROOT_PATH/doc/_sphinx/requirements.txt"'
- 'echo Installing dartdoc_json:'
- 'dart pub global activate dartdoc_json'
- 'echo Done.'
run: ./scripts/doc-setup.sh
description: Prepares the environment for documentation development.

doc-build:
Expand Down
10 changes: 10 additions & 0 deletions scripts/doc-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -e

echo Checking python version:
python3 --version && python3 -c "import sys; sys.exit(0 if sys.version_info >= (3,8) else 2)" || (echo "Error: Python 3.8+ is required" && exit 1)
echo Installing required python modules:
python3 -m pip install -r "$MELOS_ROOT_PATH/doc/_sphinx/requirements.txt"
echo Installing dartdoc_json:
dart pub global activate dartdoc_json
echo Done.

0 comments on commit 00367bf

Please sign in to comment.