-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Unify docs workflows * Fix poetry install * Oops, missed a spot * Reverting back * [pre-commit.ci] Add auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Small fix --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
9b9a47b
commit 963c7a2
Showing
5 changed files
with
70 additions
and
80 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 |
---|---|---|
|
@@ -43,27 +43,73 @@ jobs: | |
- uses: actions/[email protected] | ||
with: | ||
submodules: 'true' | ||
- name: Install dependencies, run unit tests and coverage report | ||
- name: Install poetry | ||
run: python3 -m pip install --upgrade pip && python3 -m pip install poetry | ||
- name: Set up Python | ||
uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: '3.10' | ||
cache: 'poetry' | ||
- name: Install dependencies, build docs without running notebooks | ||
run: | | ||
python3 -m pip install --upgrade pip && python3 -m pip install poetry | ||
poetry env use '3.10' | ||
source $(poetry env info --path)/bin/activate | ||
poetry install --with docs,test --all-extras | ||
# Install Pandoc | ||
PANDOC_VERSION="2.19" | ||
curl -sLo- "https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-linux-amd64.tar.gz" | tar xzf - --strip-components 2 -C /usr/local/bin --exclude="share" | ||
cd docs | ||
rm -rf source/reference/api/_autosummary | ||
make html | ||
- name: Set up Node.js | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 18 | ||
cache: yarn | ||
cache-dependency-path: '**/yarn.lock' | ||
- name: Build webpage | ||
run: | | ||
cd docs/cyclops-webpage | ||
yarn install --frozen-lockfile | ||
yarn build | ||
cp -r ../build/html build/api | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_branch: github_pages | ||
publish_dir: docs/cyclops-webpage/build | ||
|
||
release-build: | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
submodules: 'true' | ||
- name: Install poetry | ||
run: python3 -m pip install --upgrade pip && python3 -m pip install poetry | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: '3.10' | ||
cache: 'poetry' | ||
- name: Install dependencies, build docs with notebook execution | ||
run: | | ||
python3 -m pip install --upgrade pip && python3 -m pip install poetry | ||
poetry env use '3.10' | ||
source $(poetry env info --path)/bin/activate | ||
poetry install --with docs,test --all-extras | ||
# Install Pandoc | ||
PANDOC_VERSION="2.19" | ||
curl -sLo- "https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-linux-amd64.tar.gz" | tar xzf - --strip-components 2 -C /usr/local/bin --exclude="share" | ||
cd docs | ||
rm -rf source/reference/api/_autosummary | ||
make html SPHINXOPTS="-D nbsphinx_execute='never'" | ||
make html-with-notebooks | ||
- name: Set up Node.js | ||
uses: actions/[email protected] | ||
with: | ||
|
@@ -77,7 +123,6 @@ jobs: | |
yarn build | ||
cp -r ../build/html build/api | ||
- name: Deploy to GitHub Pages | ||
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true) | ||
uses: peaceiris/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,7 @@ jobs: | |
- uses: actions/[email protected] | ||
with: | ||
python-version: '3.10' | ||
cache: 'poetry' | ||
- name: Install dependencies and check code | ||
run: | | ||
export PATH=/opt/openmpi-4.1.5/bin:$PATH | ||
|
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