-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
146 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
name: Documentation | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build_docs_old: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout PtyPy Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.13' | ||
check-latest: true | ||
|
||
- name: Setup MPI | ||
uses: mpi4py/setup-mpi@v1 | ||
with: | ||
mpi: mpich | ||
|
||
- name: Install Sphinx | ||
run: pip install sphinx | ||
|
||
- name: Install PtyPy | ||
run: pip install .[full] | ||
|
||
- name: Prepare Tutorials | ||
working-directory: doc | ||
run: python script2rst.py | ||
|
||
- name: Prepare Templates | ||
working-directory: doc | ||
run: python tmp2rst.py | ||
|
||
- name: Prepare Parameters | ||
working-directory: doc | ||
run: python parameters2rst.py | ||
|
||
- name: Set Path to Sphinx Build | ||
run: echo "SPHINXBUILD=`which sphinx-build`" >> $GITHUB_ENV | ||
|
||
- name: Build Sphinx Documentation | ||
working-directory: doc | ||
run: make html | ||
|
||
- name: Upload Docs Artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: old-docs | ||
path: doc/build/html/ | ||
|
||
build_docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout PtyPy Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.13' | ||
check-latest: true | ||
|
||
- name: Setup MPI | ||
uses: mpi4py/setup-mpi@v1 | ||
with: | ||
mpi: mpich | ||
|
||
- name: Install Sphinx | ||
run: pip install sphinx | ||
|
||
- name: Install PtyPy | ||
run: pip install .[full] | ||
|
||
- name: Install docs dependencies | ||
run: pip install -r docs/requirements.txt | ||
|
||
- name: Set Path to Sphinx Build | ||
run: echo "SPHINXBUILD=`which sphinx-build`" >> $GITHUB_ENV | ||
|
||
- name: Build Sphinx Documentation | ||
working-directory: docs | ||
run: make html | ||
|
||
- name: Upload Docs Artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: new-docs | ||
path: docs/_build/html/ | ||
|
||
publish_pages: | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
needs: | ||
- build_docs_old | ||
- build_docs | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- name: Setup Pages | ||
uses: actions/[email protected] | ||
|
||
- name: Download Old Docs Artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: old-docs | ||
path: ./ | ||
|
||
- name: Download Docs Artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: new-docs | ||
path: ./docs | ||
|
||
- name: Fix File Permissions for Pages | ||
run: | | ||
chmod -R +rX . | ||
- name: Upload Merged Artifact | ||
uses: actions/[email protected] | ||
with: | ||
path: ./ | ||
|
||
- name: Publish Docs to GitHub Pages | ||
id: deployment | ||
uses: actions/[email protected] |
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 |
---|---|---|
|
@@ -15,4 +15,4 @@ documentation for details. | |
:maxdepth: 2 | ||
:caption: Contents: | ||
|
||
reference/index | ||
reference/index |
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 |
---|---|---|
|
@@ -5,4 +5,4 @@ API Reference | |
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
utils | ||
utils |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
pydata-sphinx-theme |