-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix documentation upload to github pages (#727)
- Loading branch information
Showing
5 changed files
with
29 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,11 +32,11 @@ jobs: | |
pip install -r tests/requirements-test.txt | ||
- name: Run all test with pytest | ||
run: | | ||
run: | | ||
pytest -k "slow" tests/ | ||
- name: Check images generation for documentation | ||
run: | | ||
run: | | ||
cd docs/images_generation && ./run.sh | ||
# test if package generation works and optional package upload to pypi (only on release) | ||
|
@@ -47,24 +47,24 @@ jobs: | |
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Make wheel package and validate it | ||
run: | | ||
run: | | ||
pip install wheel twine | ||
# first call to version method would generate VERSION file | ||
PYTHONPATH=. python pymchelper/run.py --version | ||
python setup.py bdist_wheel | ||
twine check dist/*.whl | ||
|
@@ -87,28 +87,19 @@ jobs: | |
docs: | ||
runs-on: ubuntu-latest | ||
needs: [make_and_upload_package] | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
permissions: | ||
id-token: write | ||
pages: write | ||
contents: write | ||
id-token: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
fetch-depth: 0 # fetch all history, as by default only last 1 commit is fetched | ||
- name: Build and Commit | ||
uses: sphinx-notes/[email protected] | ||
with: | ||
documentation_path: docs | ||
requirements_path: docs/requirements.txt | ||
- name: Push changes to gh-pages branch | ||
# this action is being triggered on release tags (named v*) | ||
if: "github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')" | ||
uses: ad-m/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: gh-pages | ||
checkout: false | ||
python_version: '3.10' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters