Skip to content

Commit b33fd60

Browse files
authored
Merge pull request #37 from QuLogic/fix-release
ci: Fix release publishing
2 parents 8b2554f + 4356264 commit b33fd60

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

.github/workflows/docs.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
1+
---
12
name: Docs
23

34
on: [push, pull_request]
45

5-
env:
6-
IS_RELEASE: |
7-
${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
8-
96
jobs:
107
build:
118
runs-on: ubuntu-20.04
129
steps:
13-
- uses: actions/checkout@v2
10+
- name: Check if release
11+
id: setup
12+
run: |
13+
echo "IS_RELEASE=${{
14+
github.event_name == 'push' && github.ref == 'refs/heads/main'
15+
}}" >> $GITHUB_OUTPUT
16+
17+
- uses: actions/checkout@v4
1418

1519
- name: Upgrade jinja
1620
run: pip install -U jinja2
@@ -20,13 +24,13 @@ jobs:
2024

2125
- name: Build
2226
run: |
23-
if [ "x$IS_RELEASE" == "xtrue" ]; then
27+
if [ "${{ steps.setup.outputs.IS_RELEASE }}" == "true" ]; then
2428
O="-t release"
2529
fi
2630
make html O="$O"
2731
2832
- name: Publish
29-
if: ${{ env.IS_RELEASE == 'true' }}
33+
if: ${{ steps.setup.outputs.IS_RELEASE == 'true' }}
3034
uses: peaceiris/actions-gh-pages@v3
3135
with:
3236
github_token: ${{ secrets.GITHUB_TOKEN }}

conf.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,8 @@
8888

8989
include_analytics = is_release_build
9090
if include_analytics:
91-
html_theme_options["google_analytics_id"] = "UA-55954603-1"
91+
html_theme_options["analytics"] = {
92+
"plausible_analytics_domain": "matplotlib.org",
93+
"plausible_analytics_url":
94+
"https://views.scientific-python.org/js/script.js"
95+
}

0 commit comments

Comments
 (0)