'GitHub actions not copying Autosummary folder generated by Sphinx to new branch
I have been trying to create a .yml file to automatically generate python docs with Sphinx and the Autosummary extension. This is supposed to perform just at the make html
command on localhost but copy the generated HTML to a gh-pages branch to be seen on my git hub pages web page. source code
in my github/workflows/build.yml file I have
name: gh-pages auto builder
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install sphinx_rtd_theme
- uses: actions/checkout@master
with:
requirements: src/requirements.txt
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: add .nojekyll
run: |
touch .nojekyll
- uses: actions/checkout@master
- name: Build and Commit
uses: sphinx-notes/pages@v2
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
when pushing the script runs as expected and the resulting gh-pages can be viewed here
the problem is with the subpages as it is generated by the Sphinx Autosummary module and doesn't get copied to the new branch.
the output can be viewed below where Autosummary does generate the required HTML
Running Sphinx v4.5.0
[autosummary] generating autosummary for: _autosummary/ml_pipeline.mymodule1.myClass1.rst, _autosummary/ml_pipeline.mymodule1.myError.rst, _autosummary/ml_pipeline.mymodule1.myGlobalFunction.rst, _autosummary/ml_pipeline.mymodule1.myTypeVar.rst, _autosummary/ml_pipeline.mymodule1.rst, _autosummary/ml_pipeline.mymodule2.myClass2.rst, _autosummary/ml_pipeline.mymodule2.rst, _autosummary/ml_pipeline.mysubpackage.mymodule3.myClass3.rst, _autosummary/ml_pipeline.mysubpackage.mymodule3.rst, _autosummary/ml_pipeline.mysubpackage.mysubsubpackage.mymodule4.myClass4.rst, _autosummary/ml_pipeline.mysubpackage.mysubsubpackage.mymodule4.rst, _autosummary/ml_pipeline.mysubpackage.mysubsubpackage.rst, _autosummary/ml_pipeline.mysubpackage.rst, _autosummary/ml_pipeline.rst, api.rst, index.rst
but when it comes to copying the files over I get the output:
Copying HTML documentation to repository
'/tmp/pages-YqISYemUPg/./_autosummary' -> '././_autosummary'
'/tmp/pages-YqISYemUPg/./_autosummary/ml_pipeline.html' -> '././_autosummary/ml_pipeline.html'
'/tmp/pages-YqISYemUPg/./_autosummary/ml_pipeline.ML_Feature.html' -> '././_autosummary/ml_pipeline.ML_Feature.html'
'/tmp/pages-YqISYemUPg/./_autosummary/ml_pipeline.ML_Feature.Feature.html' -> '././_autosummary/ml_pipeline.ML_Feature.Feature.html'
'/tmp/pages-YqISYemUPg/./_autosummary/ml_pipeline.ML_Features.html' -> '././_autosummary/ml_pipeline.ML_Features.html'
'/tmp/pages-YqISYemUPg/./_autosummary/ml_pipeline.ML_Features.Features.html' -> '././_autosummary/ml_pipeline.ML_Features.Features.html'
'/tmp/pages-YqISYemUPg/./_autosummary/ml_pipeline.ML_Input_File.html' -> '././_autosummary/ml_pipeline.ML_Input_File.html'
'/tmp/pages-YqISYemUPg/./_autosummary/ml_pipeline.ML_Input_File.Input_File.html' -> '././_autosummary/ml_pipeline.ML_Input_File.Input_File.html'
'/tmp/pages-YqISYemUPg/./_autosummary/ml_pipeline.ML_Input_Files.html' -> '././_autosummary/ml_pipeline.ML_Input_Files.html'
'/tmp/pages-YqISYemUPg/./_autosummary/ml_pipeline.ML_Input_Files.Input_Files.html' -> '././_autosummary/ml_pipeline.ML_Input_Files.Input_Files.html'
...
...
...
'/tmp/pages-YqISYemUPg/./_static/js/badge_only.js' -> '././_static/js/badge_only.js'
'/tmp/pages-YqISYemUPg/./_static/js/html5shiv-printshiv.min.js' -> '././_static/js/html5shiv-printshiv.min.js'
'/tmp/pages-YqISYemUPg/./_static/js/theme.js' -> '././_static/js/theme.js'
'/tmp/pages-YqISYemUPg/./_static/js/html5shiv.min.js' -> '././_static/js/html5shiv.min.js'
'/tmp/pages-YqISYemUPg/./_static/pydata-custom.css' -> '././_static/pydata-custom.css'
'/tmp/pages-YqISYemUPg/./_static/readthedocs-custom.css' -> '././_static/readthedocs-custom.css'
'/tmp/pages-YqISYemUPg/./.buildinfo' -> '././.buildinfo'
'/tmp/pages-YqISYemUPg/./searchindex.js' -> '././searchindex.js'
'/tmp/pages-YqISYemUPg/./objects.inv' -> '././objects.inv'
Adding HTML documentation to repository index
Recording changes to repository
[gh-pages c0053b6] Add changes for 4a7c380d5d00d39a797c854c842c6854f41d329b
Any help or guidance would be Awesome :)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|