-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moves documentation to GH pages (#13)
* Added doc workflow * Updated README.md * Changed Doc workflow * Remove RTD hook * Fix Doc workflow * Install dependencies * Bug fix
- Loading branch information
Showing
5 changed files
with
117 additions
and
28 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,87 @@ | ||
name: Doc | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
pull_request: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
unix: | ||
runs-on: macos-11 | ||
name: Doc (Python ${{ matrix.python-version }}) | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- python-version: "3.10" | ||
|
||
steps: | ||
- name: "Check out" | ||
uses: actions/checkout@v3 | ||
|
||
- name: "Install SDK on MacOS" | ||
run: source devtools/scripts/install_macos_sdk.sh | ||
|
||
- name: "Update the conda enviroment file" | ||
uses: cschleiden/replace-tokens@v1 | ||
with: | ||
tokenPrefix: '@' | ||
tokenSuffix: '@' | ||
files: devtools/conda-envs/build-macos-11.yml | ||
|
||
- uses: conda-incubator/setup-miniconda@v2 | ||
name: "Install dependencies with conda" | ||
with: | ||
activate-environment: build | ||
environment-file: devtools/conda-envs/build-doc.yml | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: "List conda packages" | ||
shell: bash -l {0} | ||
run: conda list | ||
|
||
- name: "Configure" | ||
shell: bash -l {0} | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake .. \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DPLUGIN_BUILD_CUDA_LIB=OFF | ||
- name: "Build" | ||
shell: bash -l {0} | ||
run: | | ||
cd build | ||
make -j2 install | ||
make -j2 PythonInstall | ||
- name: Build Documentation | ||
shell: bash -l {0} | ||
run: | | ||
sphinx-build ./docs ./html | ||
- name: Deploy documentation | ||
shell: bash -l {0} | ||
run: | | ||
git reset --hard HEAD | ||
set -x | ||
echo "::group::Push page to gh-pages branch" | ||
git config user.name "$(git show --format=%an -s)" | ||
git config user.email "$(git show --format=%ae -s)" | ||
git fetch origin | ||
git switch gh-pages | ||
rsync -va --delete-excluded html/ docs/ | ||
touch docs/.nojekyll | ||
git add -f docs/* | ||
git add -f docs/.nojekyll | ||
git commit -m "Docs from $GITHUB_REF $GITHUB_SHA" || echo "Branch is up to date" | ||
if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then | ||
echo "Deployment is deactivated on pull requests" | ||
else | ||
git push -f origin gh-pages | ||
fi | ||
echo "::endgroup::" |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: build | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- cmake | ||
- compilers | ||
- khronos-opencl-icd-loader | ||
- make | ||
- openmm >=7.7 | ||
- pip >=22.2 | ||
- pocl | ||
- pytest | ||
- python | ||
- swig =4.0 | ||
- numpy | ||
|
||
# Docs depends | ||
- sphinx | ||
- sphinxcontrib-bibtex | ||
- sphinx-copybutton |
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