Skip to content

Commit

Permalink
move pypi publish to separate action
Browse files Browse the repository at this point in the history
  • Loading branch information
jdebacker committed Apr 4, 2022
1 parent 0f34bc2 commit fe3095d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 21 deletions.
22 changes: 1 addition & 21 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,4 @@ jobs:
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: docs/book/_build/html # The folder the action should deploy.
publish:
needs: build
name: Publish to PyPI
if: github.repository == 'PSLmodels/OG-Core'
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Build package
run: make pip-package
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI }}
skip_existing: true
FOLDER: docs/book/_build/html # The folder the action should deploy.
27 changes: 27 additions & 0 deletions .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish package to PyPI

on:
push:
branches:
- master

jobs:
deploy:
name: Publish to PyPI
if: github.repository == 'PSLmodels/OG-Core'
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Build package
run: make pip-package
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI }}
skip_existing: true

0 comments on commit fe3095d

Please sign in to comment.