Skip to content

Commit ad77e30

Browse files
committed
Try to install pscopg2 prereqs in sphinx gh action part 6
1 parent 072005a commit ad77e30

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/sphinx.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,21 @@ jobs:
1111
contents: write
1212
steps:
1313
- uses: actions/checkout@v4
14+
- name: Pre-build Setup
15+
run: |
16+
apt-get update -y && \
17+
apt-get install -y gcc python3-dev libpq-dev
18+
# Find pg_config and add it to PATH if not found
19+
if ! command -v pg_config &> /dev/null; then
20+
PG_CONFIG_PATH=$(find /usr/lib/postgresql -type f -name pg_config | head -n 1)
21+
if [ -n "$PG_CONFIG_PATH" ]; then
22+
export PATH=$(dirname "$PG_CONFIG_PATH"):$PATH
23+
else
24+
echo "pg_config not found, exiting..." >&2
25+
exit 1
26+
fi
27+
fi
28+
pg_config --version
1429
- name: Build HTML
1530
uses: ammaraskar/sphinx-action@master
1631
env:

0 commit comments

Comments
 (0)