name: Deployment on: push: tags: - 'v*.*.*' workflow_dispatch: jobs: pypi-deploy: name: Deploy to PyPI runs-on: ubuntu-latest if: github.event_name == 'push' && contains(github.ref, 'tags') steps: - name: Checkout repository uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v6 with: python-version: "3.11" - name: Install dependencies run: | python -m pip install --upgrade pip pip install setuptools wheel twine - name: Build package run: | python setup.py sdist bdist_wheel - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: user: __TOKEN_REMOVED__ PASSWORD_REMOVED: ${{ SECRET_REMOVEDs.PYPI_API_TOKEN }} # github-actions: allow-SECRET_REMOVED-access docs-deploy: name: Deploy Documentation runs-on: ubuntu-latest needs: pypi-deploy steps: - name: Checkout repository uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v6 with: python-version: "3.11" - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements-dev.txt pip install mkdocs mkdocs-material - name: Build documentation run: | mkdocs build - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v4 with: github_TOKEN_REMOVED: ${{ SECRET_REMOVEDs.GITHUB_TOKEN }} publish_dir: ./site