Merge pull request #10 from michaelachrisco/docs #11
This file contains hidden or 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 Package via Poetry | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checkout the repository | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| # Set up Python with Poetry | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.x' # Use the appropriate Python version for your project | |
| # Install Poetry | |
| - name: Install Poetry | |
| run: | | |
| curl -sSL https://install.python-poetry.org | python3 - | |
| echo "$(poetry --version)" # Verify Poetry installation | |
| # Install dependencies from the correct poetry.lock | |
| - name: Install dependencies | |
| run: | | |
| cd accelapy/accelapy # Navigate to the folder containing poetry.lock | |
| poetry install --no-root # Install dependencies from poetry.lock (without installing the package itself) | |
| # Build the package | |
| - name: Build the package | |
| run: | | |
| cd accelapy/accelapy # Navigate to the folder containing the poetry.toml | |
| poetry build # Build the package (source distribution and wheel) | |
| # Deploy the package (for example, to PyPI) | |
| - name: Deploy to PyPI | |
| env: | |
| PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} # Set your PyPI username as a secret | |
| run: | | |
| cd accelapy/accelapy # Navigate to the folder containing poetry.toml | |
| poetry config pypi-token.pypi $PYPI_TOKEN | |
| poetry publish |