Skip to content

Commit

Permalink
build: add support for analytics secret key
Browse files Browse the repository at this point in the history
Signed-off-by: Akshay "XA" Mestry <[email protected]>
  • Loading branch information
xames3 committed Mar 2, 2024
1 parent 0900ed6 commit e8e60e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
env:
GOOGLE_ANALYTICS_ID: ${{ secrets.GOOGLE_ANALYTICS_ID }}

- name: Build Sphinx documentation pages
run: sphinx-build -EWaq -b html ${{ env.SOURCE_DIR }} ${{ env.OUTPUT_DIR }}
env:
GOOGLE_ANALYTICS_ID: ${{ secrets.GOOGLE_ANALYTICS_ID }}

- name: Publish L.E.A.R.N's static files to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
Expand Down
4 changes: 1 addition & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,7 @@ class LearnProject(t.NamedTuple):
html_title = _project.short_title
html_theme_options = {
"analytics": {
"google_analytics_id": os.environ.get(
"GOOGLE_ANALYTICS_ID", "G-XXXXXXXXXX"
)
"google_analytics_id": os.environ.get("GOOGLE_ANALYTICS_ID", "")
},
"article_header_end": [],
"footer_center": ["theme-version"],
Expand Down

0 comments on commit e8e60e8

Please sign in to comment.