From 40005d878c3dc712b55f7f986b852818565816c0 Mon Sep 17 00:00:00 2001 From: Ikechukwu Uchendu Date: Sun, 28 Jul 2024 13:00:22 -0400 Subject: [PATCH] Using conda to easily install pandoc --- .github/workflows/build-docs.yml | 43 +++++++++++++++----------------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 87558dc..dbc099b 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -14,34 +14,31 @@ jobs: with: submodules: 'recursive' fetch-depth: 0 - - name: Update submodules run: | git submodule update --init --recursive --remote - - - name: Set up Python - uses: actions/setup-python@v4 + - name: Set up Conda + uses: conda-incubator/setup-miniconda@v2 with: + auto-update-conda: true python-version: '3.10' - - - name: Install docs dependencies - run: pip install -r docs/requirements.txt - - - name: Install A2Perf - run: pip install -e . - - - name: Build - run: sphinx-build -b dirhtml -v docs _build - - - name: Move 404 - run: mv _build/404/index.html _build/404.html - - - name: Update 404 links - run: python docs/_scripts/move_404.py _build/404.html - - - name: Remove .doctrees - run: rm -r _build/.doctrees - + activate-environment: a2perf-docs + - name: Install pandoc and other dependencies + shell: bash -l {0} + run: | + conda install -c conda-forge pandoc + pip install -r docs/requirements.txt + pip install -e . + - name: Build documentation + shell: bash -l {0} + run: | + sphinx-build -b dirhtml -v docs _build + - name: Post-process documentation + shell: bash -l {0} + run: | + mv _build/404/index.html _build/404.html + python docs/_scripts/move_404.py _build/404.html + rm -r _build/.doctrees - name: Upload to GitHub Pages uses: JamesIves/github-pages-deploy-action@v4 with: