Skip to content

Build pypi

Build pypi #35

Workflow file for this run

name: Deploy
on:
push:
branches: [ main ]
jobs:
documentation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: "3.12"
environment-file: documentation/environment.yml
auto-activate-base: false
- name: Install Jupyterbook
shell: bash -l {0}
run: |
cp documentation/_config.yml .
cp documentation/_toc.yml .
cp documentation/*.md .
jupyter-book build . --path-output public
mv public/_build/html public_html
touch public_html/.nojekyll
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: public_html # The folder the action should deploy.
CLEAN: true
pypi:
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/python_workflow_definition
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: "3.12"
environment-file: binder/environment.yml
auto-activate-base: false
- name: Build
shell: bash -l {0}
run: |
cd python_workflow_definition
hatch build
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: python_workflow_definition/