Fix running pgraph in manual #24
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
on: | |
push: | |
branches: | |
- main | |
name: Render and Publish Manual | |
permissions: | |
contents: write | |
pages: write | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-latest | |
services: | |
neo4j: | |
image: neo4j | |
ports: | |
- 7687:7687 | |
env: | |
NEO4J_AUTH: none | |
NEO4J_server.bolt.advertised_address: "localhost:7687" | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Cache virtualenv | |
uses: actions/cache@v4 | |
with: | |
key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('requirements.txt') }} | |
path: .venv | |
- name: Install Python dependencies | |
run: | | |
python -m venv .venv | |
source .venv/bin/activate | |
python -m pip install -r requirements.txt | |
echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH | |
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV | |
- name: Install node | |
uses: actions/setup-node@v4 | |
- name: Install node modules | |
run: | | |
npm ci | |
echo "$(pwd)/node_modules/.bin" >> $GITHUB_PATH | |
- name: Import example graph | |
run: pgraph -t neo4j manual/crm-pg-example.pg neo4j.json | |
- name: Set up Quarto | |
uses: quarto-dev/quarto-actions/setup@v2 | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish to GitHub Pages (and render) | |
uses: quarto-dev/quarto-actions/publish@v2 | |
with: | |
path: manual | |
target: gh-pages | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |