proposal: Build the book somewhere other than root directory
yngtodd opened this issue · comments
Thank you for putting together this action!
Is your feature request related to a problem? Please describe.
I am having a bit of difficulty when building somewhere other than the root of the project. The book will build, but I am getting a 404 error when I go to the pages site.
Describe the solution you'd like
I am experimenting with using mdbook
for the documentation of my Python projects. With that, I would like to keep with Python conventions to have my docs stored in project_root/docs
. I set my actions yml file to use the following:
# ...
- run: cd docs && mdbook build && cd ..
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/book
Here is a link to my gh-pages.yml.
Describe alternatives you've considered
I could keep everything in the project root, but it may be confusing for users to find the markdown files for the docs.
Additional context
I might be missing a final step in the process. My GitHub settings page shows that the book is being hosted at pages site. Not sure why I am getting a 404 error.
You just forget to enable GitHub Pages.
README - peaceiris/actions-gh-pages
Notes: Actually, the GITHUB_TOKEN works for deploying to GitHub Pages but it has still some limitations. For the first deployment, we need to select the gh-pages branch or master branch on the repository settings tab. See First Deployment with GITHUB_TOKEN
First Deployment with GITHUB_TOKEN - peaceiris/actions-gh-pages
Do the second deployment like the README.
First Deployment with GITHUB_TOKEN - peaceiris/actions-gh-pages
Ah, thanks for your help. Triggering another build fixed the issue for me! Thanks again for putting this together!