just-the-docs / just-the-docs-template

one-click template to use just-the-docs on GitHub Pages
https://just-the-docs.github.io/just-the-docs-template/
MIT License
128 stars 109 forks source link

Changing the monitoring directory to docs #39

Closed NikolaAndro closed 8 months ago

NikolaAndro commented 9 months ago

Hi,

I followed the instructions from the ReadMe and I could not get the pages workflow to run correctly after making changes so that the monitoring directory is docs rather than the home dir.

I get the following error: An error occurred trying to start process '/usr/bin/bash' with working directory '/home/runner/work/squids_learning/squids_learning/docs'. No such file or directory

There is double squids_learning directory, which is not true. However, I do not know where is that configuration so I can change it. Does anyone have any advice? Here is the link to the failed workflow: https://github.com/NikolaAndro/squids_learning/actions/runs/7550917678/job/20557324688#step:2:5

mattxwang commented 9 months ago

Hi @NikolaAndro,

Thanks for submitting an issue. It looks like main has since changed from when you made this issue, but I suspect that the line containing working-directory: docs is the problem:

jobs:
  # Build job
  build:
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: docs

If the entirety of your Jekyll site & config lived within docs, this would be okay! But, in this case, your Jekyll site is still rooted at the root of your repository (e.g. Gemfile and _config.yml is at the top-level). So, you may want to revert the changes you made earlier to match the template.

Separately, if you want to put documents in a docs folder, that's totally okay! You don't need to do anything special out-of-the-box for that to work.

Let me know if that doesn't resolve the problem; happy to follow up more.

mattxwang commented 8 months ago

Going to close this issue due to inactivity, feel free to respond and re-open if there are further issues!