I have been trying to automate a github workflow using Sphinx to document some Python doce that I have written. The goal is to run the ‘make html’ and ‘make latex’ after any modifications are made to keep the documentation up-to-date. I hava created a simple workflow but when I run it with guthub actions I get the error:
Run make html
Error: An error occurred trying to start process ‘/usr/bin/bash’ with working directory ‘/home/runner/work/Repo_Name/Repo_Name/Directory_Name/docs/python’. No such file or directory
I’m not sure if this has to do with the way I have the environment set up or if it’s something in the actios workflow itself? I’ve tried running the workflow locally using nektos act and it seems to work, so not sure why it doesn’t work here.
This is what I have so far for the workflow:
name: Sphinx documentation generation
on:
push:
pull_request:
workflow_call:
workflow_dispatch:
jobs:
build-python-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install sphinx
pip install -r requirements.txt
- name: Build HTML
run: make html
working-directory: Directory_Name/docs/python
- name: Build LaTeX
run: make latex
working-directory: Directory_Name/docs/python
- name: Upload HTML
uses: actions/upload-artifact@v3
with:
name: python-html-docs
path: Directory_Name/docs/python/_build/html
- name: Upload LaTeX
uses: actions/upload-artifact@v3
with:
name: python-pdf-docs
path: Directory_Name/docs/python/_build/latex`
I've tried solutions for similar issues but none of the solutions have worked for me. This is my first time using GitHub actions so I'm not sure if I'm going wrong somewhere or if there's something I've missed, but would appreciate any feedback or suggestions.