diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index ed9a481..a6f7ba7 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -4,16 +4,22 @@ on: push: branches: [main, release] - jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - name: Set up Python environment and dependencies + run: | + apt-get update -y && apt-get install -y python3 python3-pip python3-venv pandoc gcc + python3 -m venv venv + . venv/bin/activate + pip install --upgrade pip setuptools wheel + pip install -r docs/requirements.txt - name: Build HTML uses: ammaraskar/sphinx-action@0.4 with: - pre-build-command: "apt-get update -y && apt-get install -y pandoc gcc" + pre-build-command: ". venv/bin/activate" - name: Upload artifacts uses: actions/upload-artifact@v3 with: @@ -24,4 +30,4 @@ jobs: if: github.ref == 'refs/heads/main' with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: docs/build/html + publish_dir: docs/build/html \ No newline at end of file