Skip to content

Commit 27a62cc

Browse files
jmduarteJanFSchulte
authored andcommitted
Fix release notes + version in docs (fastmachinelearning#742)
* Fix release notes? * upload artifact * try global git config * try more tricks * don't take ownership * Edit on GitHub
1 parent b3903e0 commit 27a62cc

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

.github/workflows/build-sphinx.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,13 @@ jobs:
1414
with:
1515
fetch-depth: 0
1616
ref: ${{ github.event.pull_request.head.sha }}
17+
- name: Allow for file ownership conflicts with Docker and GitHub Actions
18+
run: git config --global --add safe.directory '*'
1719
- uses: jmduarte/sphinx-action@main
20+
env:
21+
SPHINX_GITHUB_CHANGELOG_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1822
with:
23+
pre-build-command: "git config --system --add safe.directory '*'"
1924
docs-folder: "docs/"
2025
- name: Commit Documentation Changes
2126
run: |

.github/workflows/test-sphinx.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ jobs:
1414
with:
1515
fetch-depth: 0
1616
ref: ${{ github.event.pull_request.head.sha }}
17+
- name: Allow for file ownership conflicts with Docker and GitHub Actions
18+
run: git config --global --add safe.directory '*'
1719
- uses: jmduarte/sphinx-action@main
20+
env:
21+
SPHINX_GITHUB_CHANGELOG_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1822
with:
23+
pre-build-command: "git config --system --add safe.directory '*'"
1924
docs-folder: "docs/"
25+
- uses: actions/upload-artifact@v3
26+
with:
27+
path: docs/_build/html

docs/conf.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,8 @@ def get_pypi_version(package, url_pattern=URL_PATTERN):
7272
'sphinx_github_changelog',
7373
]
7474

75-
# Note: to build locally, you will need to set the ACTIONS_RUNTIME_TOKEN
75+
# Note: to build locally, you will need to set the SPHINX_GITHUB_CHANGELOG_TOKEN
7676
# environment variable to a personal access token with repo scope
77-
sphinx_github_changelog_token = os.environ["ACTIONS_RUNTIME_TOKEN"]
7877

7978
# Add any paths that contain templates here, relative to this directory.
8079
templates_path = ['_templates']
@@ -117,3 +116,11 @@ def get_pypi_version(package, url_pattern=URL_PATTERN):
117116
'includehidden': True,
118117
'titles_only': False,
119118
}
119+
120+
html_context = {
121+
'display_github': True, # Integrate GitHub
122+
'github_user': 'fastmachinelearning', # Username
123+
'github_repo': "hls4ml", # Repo name
124+
'github_version': 'main', # Version
125+
'conf_py_path': '/docs/', # Path in the checkout to the docs root
126+
}

0 commit comments

Comments
 (0)