Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 16 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -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
19 changes: 0 additions & 19 deletions .readthedocs.yml

This file was deleted.

1 change: 1 addition & 0 deletions doc/_themes/spiffworks/globaltoc.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ toctree(collapse=True, maxdepth=4, includehidden=True) }}
48 changes: 48 additions & 0 deletions doc/_themes/spiffworks/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{%- extends "basic/layout.html" %}

{%- block extrahead %}
{{ super() }}
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;1,8..60,300;1,8..60,400;1,8..60,600&family=Geist:wght@300;400;500;600;700&display=swap" rel="stylesheet"/>
{%- endblock %}

{%- block header %}
<nav class="sw-nav">
<a href="https://spiff.works" class="sw-logo">
<img src="/images/logo/logo.svg" alt="SpiffWorks" height="28" onerror="this.style.display='none'"/>
<span class="sw-logo-name">Spiff<span>Works</span></span>
</a>
<a href="https://spiff.works" class="sw-learn-more">Learn More →</a>
</nav>
{%- endblock %}

{%- block relbar2 %}{% endblock %}

{%- block content %}
<div class="docs-wrapper">
<aside class="docs-sidebar" id="docs-sidebar">
<div class="docs-sidebar-inner">
{%- include "globaltoc.html" %}
<div class="docs-search">
{%- include "searchbox.html" %}
</div>
</div>
</aside>

<main class="docs-main" role="main">
<div class="docs-content">
{%- block body %}{% endblock %}
</div>
{%- if prev or next %}
<nav class="docs-pagination" aria-label="Page navigation">
{%- if prev %}<a class="docs-prev" href="{{ prev.link|e }}">← {{ prev.title }}</a>{%- endif %}
{%- if next %}<a class="docs-next" href="{{ next.link|e }}">{{ next.title }} →</a>{%- endif %}
</nav>
{%- endif %}
</main>
</div>
{%- endblock %}

{%- block scripts %}
{{ super() }}
<script>if (typeof mermaid !== 'undefined') { mermaid.initialize({ startOnLoad: true, theme: 'default' }); }</script>
{%- endblock %}
Loading
Loading