Skip to content

Commit

Permalink
Postponing version switcher for another day.
Browse files Browse the repository at this point in the history
  • Loading branch information
liquidz00 committed Jan 13, 2025
1 parent 573802f commit ce90787
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 27 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- 'main'
- 'develop'
paths:
- 'docs/**'
- 'src/**'
Expand Down Expand Up @@ -40,13 +39,12 @@ jobs:
- name: Build Sphinx Docs
env:
PYTHONPATH: ${{ github.workspace }}
GITHUB_REF_NAME: ${{ github.ref_name }}
run: make docs BRANCH=${{ github.ref_name }}
run: make docs

- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'docs/_build/${{ github.ref_name }}/'
path: 'docs/_build/
- name: Deploy to GitHub Pages
id: deployment
Expand Down
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,4 @@ build:
python3 -m build --sdist --wheel

docs:
@BRANCH=${BRANCH:-main} && \
mkdir -p docs/_build/html/$$BRANCH && \
sphinx-build -b html docs/ docs/_build/html/$$BRANCH
sphinx-build -b html docs/ docs/_build/
12 changes: 0 additions & 12 deletions docs/_static/switcher.json

This file was deleted.

10 changes: 2 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

branch = os.getenv("GITHUB_REF", "main").split("/")[-1]

html_baseurl = f"http://patcher.liquidzoo.io/{branch}"
html_baseurl = "http://patcher.liquidzoo.io"
html_theme = "pydata_sphinx_theme"
html_logo = "_static/logo.svg"
html_favicon = "_static/logo.svg"
Expand All @@ -104,11 +102,7 @@
"navbar_align": "left",
"announcement": "https://raw.githubusercontent.com/liquidz00/Patcher/main/docs/_templates/custom-template.html",
"show_prev_next": False,
"switcher": {
"json_url": "https://patcher.liquidzoo.io/_static/switcher.json",
"version_match": branch, # Dynamically match
},
"navbar_start": ["navbar-logo", "version-switcher"],
"navbar_start": ["navbar-logo"],
"navbar_center": ["navbar-nav"],
"navbar_end": ["theme-switcher", "navbar-icon-links"],
"icon_links": [
Expand Down

0 comments on commit ce90787

Please sign in to comment.