diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9b28f9b9..21b7cfdf 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -44,35 +44,42 @@ jobs: run: | make html + - name: Upload built HTML + uses: actions/upload-artifact@v4 + with: + name: docs-html + path: doc/_build/html/ + sync-to-website: name: sync-docs-to-website needs: build if: github.event_name == 'push' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest steps: - - name: Check out this repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4 + - name: Download built HTML + uses: actions/download-artifact@v4 with: - persist-credentials: false + name: docs-html + path: docs-html - name: Check out website repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4 with: - repository: sartography/SpiffWorks_Website + repository: sartography/SpiffWorks_WebsiteRea token: ${{ secrets.SPIFFWORKS_WEBSITE_UPDATE_TOKEN }} path: website-repo - - name: Sync docs source files + - name: Sync built HTML to website run: | - mkdir -p website-repo/docs/spiffworkflow/ - rsync -av --delete doc/ website-repo/docs/spiffworkflow/ + mkdir -p website-repo/static/docs/spiffworkflow/ + rsync -av --delete docs-html/ website-repo/static/docs/spiffworkflow/ - name: Commit and push working-directory: website-repo run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - git add docs/spiffworkflow/ + git add static/docs/spiffworkflow/ git diff --staged --quiet && echo "No changes to sync." && exit 0 git commit -m "docs(spiffworkflow): sync from ${{ github.repository }}@${{ github.sha }}" git push diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..a1622695 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,16 @@ +version: 2 + +build: + os: ubuntu-22.04 + tools: + python: "3.12" + +sphinx: + configuration: doc/conf.py + +python: + install: + - method: pip + path: . + extra_requirements: + - doc diff --git a/.readthedocs.yml b/.readthedocs.yml deleted file mode 100644 index 6b484321..00000000 --- a/.readthedocs.yml +++ /dev/null @@ -1,19 +0,0 @@ -# .readthedocs.yaml -# Read the Docs configuration file -# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details -version: 2 - -build: - os: ubuntu-22.04 - tools: - python: "latest" - -# Optionally build your docs in additional formats such as PDF -formats: [] - -python: - install: - - method: pip - path: . - extra_requirements: - - doc diff --git a/doc/_themes/spiffworks/globaltoc.html b/doc/_themes/spiffworks/globaltoc.html new file mode 100644 index 00000000..73c9bb63 --- /dev/null +++ b/doc/_themes/spiffworks/globaltoc.html @@ -0,0 +1 @@ +{{ toctree(collapse=True, maxdepth=4, includehidden=True) }} diff --git a/doc/_themes/spiffworks/layout.html b/doc/_themes/spiffworks/layout.html new file mode 100644 index 00000000..a172715a --- /dev/null +++ b/doc/_themes/spiffworks/layout.html @@ -0,0 +1,48 @@ +{%- extends "basic/layout.html" %} + +{%- block extrahead %} +{{ super() }} + +{%- endblock %} + +{%- block header %} + +{%- endblock %} + +{%- block relbar2 %}{% endblock %} + +{%- block content %} +