Skip to content

Merge pull request #48 from iosefa/bump-0.3.7 #17

Merge pull request #48 from iosefa/bump-0.3.7

Merge pull request #48 from iosefa/bump-0.3.7 #17

Workflow file for this run

name: Publish Python Package and Docker Image
on:
push:
tags:
- 'v*.*.*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Publish to PyPI
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/* -u __token__ -p $PYPI_TOKEN
docker:
runs-on: ubuntu-latest
needs: release
steps:
- name: Check out the repository
uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build Docker image
run: docker build -t pyforestscan .
- name: Tag Docker image
run: docker tag pyforestscan iosefa/pyforestscan:latest
- name: Push Docker image
run: docker push iosefa/pyforestscan:latest
docs:
runs-on: ubuntu-latest
needs: docker
steps:
- name: Check out the repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install MkDocs and plugins
run: |
pip install \
mkdocs \
mkdocs-material \
mkdocstrings \
mkdocstrings-python \
mkdocs-git-revision-date-plugin \
mkdocs-jupyter \
pymdown-extensions
- name: Build MkDocs site
run: mkdocs build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GH_PAGES_TOKEN }}
publish_dir: ./site