-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add docs and release to github actions
- Loading branch information
Showing
4 changed files
with
138 additions
and
110 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.9"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: "pip" | ||
cache-dependency-path: '**/setup.py' | ||
|
||
- name: Build package | ||
run: | | ||
python${{ matrix.python-version }} -m pip install --upgrade pip pip-tools build setuptools setuptools_scm wheel | ||
python${{ matrix.python-version }} -m build | ||
- name: Publish package | ||
uses: pypa/gh-action-pypi-publish@release/v1.5 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
|
||
docs: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.9"] | ||
needs: | ||
- deploy | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: "pip" | ||
cache-dependency-path: '**/setup.py' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python${{ matrix.python-version }} -m pip install --upgrade pip pip-tools setuptools_scm | ||
python${{ matrix.python-version }} -m piptools sync --user requirements/ubuntu-latest_py${{ matrix.python-version }}_extras.txt | ||
# Using non-editable install for testing building of MANIFEST files | ||
python${{ matrix.python-version }} -m pip install --no-deps . | ||
- name: Build | ||
run: | | ||
cd docs_rst | ||
python${{ matrix.python-version }} featurizer_summary.py > featurizer_summary.rst | ||
python${{ matrix.python-version }} dataset_summary.py > dataset_summary.rst | ||
sphinx-apidoc -o . -f ../matminer | ||
make html | ||
cp _static/* ../docs/html/_static | ||
cd ../docs | ||
cp -r html/* . | ||
rm -r html | ||
rm -r doctrees | ||
touch .nojekyll | ||
git add . | ||
git commit -a -m "update docs" | ||
git push |
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