-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ci): don't try to push docs on master push (#199)
* fix(ci): don't try to push docs on master push * fix(ci): don't try to commit docs on master push * chore(ci): fix names * fix(ci): yaml syntax * fix(ci): run at correct times * fix(ci): ensure running on newly opened PRs * fix(ci): run tests on all branches * fix(ci): remove trailing ' preventing run * Apply automatic documentation changes
- Loading branch information
Showing
9 changed files
with
64 additions
and
55 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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
name: CI | ||
|
||
on: | ||
# run on pushed commits to master and on new commits on pull requests | ||
push: | ||
pull_request: | ||
types: [opened, reopened] | ||
types: [opened, synchronize] | ||
|
||
jobs: | ||
Security: | ||
|
@@ -16,51 +17,4 @@ jobs: | |
name: Python Unit Test | ||
uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@master | ||
with: | ||
python-version: '3.9' | ||
|
||
build_docs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{github.event.pull_request.head.ref}} | ||
repository: ${{github.event.pull_request.head.repo.full_name}} | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.9 | ||
- uses: actions/cache@preview | ||
with: | ||
path: ~/.cache/pypoetry/virtualenvs | ||
key: ${{ runner.os }}-poetry-${{ hashFiles(format('{0}{1}', github.workspace, '/poetry.lock')) }} | ||
restore-keys: | | ||
${{ runner.os }}-poetry- | ||
- name: Install dependencies | ||
run: | | ||
pip install poetry | ||
poetry config virtualenvs.create false | ||
poetry install -vv --all-extras --no-interaction | ||
poetry show -vv | ||
# install sphinx from PyPI (as of 03/16/21 python3-sphinx is broken) | ||
# sudo apt-get install python3-sphinx | ||
pip install sphinx | ||
pip uninstall -y asyncio | ||
pip list | ||
cd | ||
- name: Build docs | ||
run: | | ||
sphinx-build --version | ||
export PYTHONPATH="${PYTHONPATH}:${{ env.pythonLocation }}/lib/python3.9/site-packages" | ||
cd docs | ||
poetry run make html | ||
cd .. | ||
- uses: stefanzweifel/[email protected] | ||
with: | ||
commit_message: Apply automatic documentation changes | ||
|
||
# Optional name of the branch the commit should be pushed to | ||
# Required if Action is used in Workflow listening to the `pull_request` event | ||
branch: ${{ github.head_ref }} | ||
python-version: '3.9' |
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,54 @@ | ||
name: Docs | ||
|
||
on: | ||
# DON'T run on pushed commits to master, ONLY on new commits on pull requests | ||
pull_request: | ||
types: [opened, synchronize] | ||
|
||
jobs: | ||
build_docs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{github.event.pull_request.head.ref}} | ||
repository: ${{github.event.pull_request.head.repo.full_name}} | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.9 | ||
- uses: actions/cache@preview | ||
with: | ||
path: ~/.cache/pypoetry/virtualenvs | ||
key: ${{ runner.os }}-poetry-${{ hashFiles(format('{0}{1}', github.workspace, '/poetry.lock')) }} | ||
restore-keys: | | ||
${{ runner.os }}-poetry- | ||
- name: Install dependencies | ||
run: | | ||
pip install poetry | ||
poetry config virtualenvs.create false | ||
poetry install -vv --all-extras --no-interaction | ||
poetry show -vv | ||
# install sphinx from PyPI (as of 03/16/21 python3-sphinx is broken) | ||
# sudo apt-get install python3-sphinx | ||
pip install sphinx | ||
pip uninstall -y asyncio | ||
pip list | ||
cd | ||
- name: Build docs | ||
run: | | ||
sphinx-build --version | ||
export PYTHONPATH="${PYTHONPATH}:${{ env.pythonLocation }}/lib/python3.9/site-packages" | ||
cd docs | ||
poetry run make html | ||
cd .. | ||
- uses: stefanzweifel/[email protected] | ||
with: | ||
commit_message: Apply automatic documentation changes | ||
|
||
# Optional name of the branch the commit should be pushed to | ||
# Required if Action is used in Workflow listening to the `pull_request` event | ||
branch: ${{ github.head_ref }} |
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
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