Skip to content

Commit

Permalink
Debugging again
Browse files Browse the repository at this point in the history
  • Loading branch information
gphipps authored and gphipps committed Aug 6, 2024
1 parent 6bc502a commit 6e7ca23
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ permissions:
jobs:
docs:
runs-on: ubuntu-latest
environment:
name: github-pages
permissions:
pages: write
id-token: write
Expand All @@ -26,13 +28,20 @@ jobs:
pip install sphinx
- name: Generate API docs & Build sphinx documentation
run: |
sphinx-build -M help docs docs-out
git fetch --tags
git checkout publish-docs
git pull
cd docs
echo "docs.py Calling build.py"
python build.py
echo "Done Calling build.py"
cd ..
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './docs-out'
path: './docs/pages'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
14 changes: 7 additions & 7 deletions docs/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ def build_doc(version: str) -> None:
run("git checkout publish-docs -- conf.py")
run("git checkout publish-docs -- meta.toml")

run("sphinx-build -M html ../docs ../_build")
run("ls ../_build")
run(f"mv ../_build/html ../pages/{version}")
run("rm -rf ../_build")
run("sphinx-build -M html . _build")
run("ls _build")
run(f"mv _build/html pages/{version}")
run("rm -rf _build")
run("git checkout publish-docs")


def build_init_page(version: str) -> None:
with open("../pages/index.html", "w") as f:
with open("pages/index.html", "w") as f:
f.write(f"""<!doctype html>
<meta http-equiv="refresh" content="0; url=./{version}/">""")

Expand All @@ -29,8 +29,8 @@ def build_init_page(version: str) -> None:
# Executes in the docs directory, hence the constant use of ..
# create pages folder
print("Python main")
run("rm -rf ../pages")
run("mkdir ../pages")
run("rm -rf pages")
run("mkdir pages")

# get versions
with open("meta.toml", "rb") as f:
Expand Down

0 comments on commit 6e7ca23

Please sign in to comment.