Skip to content

Commit 51d8220

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 3033d17 + baa17ef commit 51d8220

2 files changed

Lines changed: 31 additions & 16 deletions

File tree

.github/workflows/docs.yaml

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,37 @@ on:
77
workflow_run:
88
workflows: [Python Tests]
99
types:
10-
- completed
10+
- completed
1111
branches:
12-
- main
12+
- main
1313

1414
jobs:
1515
build-and-publish-docs:
1616
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@v4
2020

21-
- name: Setup uv
22-
uses: astral-sh/setup-uv@v6
23-
with:
24-
enable-cache: true
25-
pyproject-file: pyproject.toml
21+
- name: Setup uv
22+
uses: astral-sh/setup-uv@v6
23+
with:
24+
enable-cache: true
25+
pyproject-file: pyproject.toml
2626

27-
- name: Build docs
28-
run: |
29-
APP_MODULE_NAME=$(ls src -U | head -1) # Get the first module name in the src directory
30-
uv run --frozen --extra docs pdoc src/"$APP_MODULE_NAME" -o docs_build -t docs/pdoc-theme --docformat google
31-
touch docs_build/.nojekyll
27+
- name: Build docs
28+
run: |
29+
APP_MODULE_NAME=$(ls src -U | head -1) # Get the first module name in the src directory
30+
uv run --frozen --extra docs pdoc src/"$APP_MODULE_NAME" -o docs_build -t docs/pdoc-theme --docformat google
31+
touch docs_build/.nojekyll
3232
33-
- uses: JamesIves/github-pages-deploy-action@v4
34-
with:
35-
folder: docs_build
33+
- uses: JamesIves/github-pages-deploy-action@v4
34+
with:
35+
folder: docs_build
36+
37+
- name: Deploy to Cloudflare Pages
38+
id: cloudflare-deployment
39+
uses: cloudflare/wrangler-action@v3
40+
with:
41+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
42+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
43+
command: pages deploy docs_build/ --project-name=styx --branch=main

docs/pdoc-theme/frame.html.jinja2

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{% extends "default/frame.html.jinja2" %}
2+
3+
{% block head %}
4+
<!-- Cloudflare Web Analytics -->
5+
<script defer src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon='{"token": "3cc81275d9484412b3569fdb3580758a"}'></script>
6+
<!-- End Cloudflare Web Analytics -->
7+
{% endblock %}

0 commit comments

Comments
 (0)