diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 381a751..d194aac 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -13,28 +13,30 @@ jobs: runs-on: ubuntu-latest steps: + # Checkout code from the repository - name: Checkout code uses: actions/checkout@v2 + # Set up Python 3.9 environment - name: Set up Python uses: actions/setup-python@v2 with: python-version: '3.9' - # Upgrade pip and install build tools + # Upgrade pip and install build tools - name: Upgrade pip and install build tools run: | - pip install --upgrade pip - pip install --upgrade setuptools wheel + pip install --upgrade pip setuptools wheel + # Install dependencies from requirements.txt - name: Install dependencies - run: | - pip install --upgrade pip setuptools wheel - pip install -r requirements.txt + run: pip install -r requirements.txt + # Build Docker image - name: Build Docker image run: docker build -t clustering-app . + # Push Docker image to DockerHub - name: Push Docker image to DockerHub run: | echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin