fix pypi badges #33
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
--- | |
name: Deploy docs to github pages | |
on: | |
push: | |
branches: | |
- master | |
- doc_deployment | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
activate-environment: pytoda | |
environment-file: conda.yml | |
auto-activate-base: false | |
- uses: ammaraskar/sphinx-action@master | |
with: | |
pre-build-command: pip install -r requirements.txt && pip install -r dev_requirements.txt | |
docs-folder: "docs/" | |
- name: Commit documentation changes | |
run: | | |
git clone https://github.com/PaccMann/paccmann_datasets --branch gh_pages --single-branch gh_pages | |
cp -r docs/_build/html/* gh_pages/ | |
touch gh_pages/.nojekyll | |
cd gh_pages | |
git config --local user.email "pytoda-actions@github.com" | |
git config --local user.name "GitHub Action" | |
git add . | |
git commit -m "Update documentation" -a || true | |
# The above command will fail if no changes were present, | |
# so we ignore the return code. | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
branch: gh_pages | |
directory: gh_pages | |
github_token: ${{ secrets.GH_TOKEN }} |