Skip to content

Commit

Permalink
Update integrate.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Lojlvenom authored Nov 21, 2024
1 parent ee9a3bd commit 38f5941
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions .github/workflows/integrate.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,38 @@
name: Build and Deploy Flask App
name: Flask CI

on:
push:
branches:
- main
branches: [main]

jobs:
build-and-deploy:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
python-version: 3.8

- name: Create virtual environment
run: |
python -m venv venv
source venv/bin/activate
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Build and deploy
env:
FLASK_APP: app.py
FLASK_ENV: production
- name: Print debugging information
run: |
flask build
docker build -t my-flask-app .
docker tag my-flask-app:latest $(docker images | grep my-flask-app | cut -d : -f 1)
docker push my-flask-app:latest
echo "Python Version: $(python --version)"
echo "Working Directory: $(pwd)"
echo "Contents of Working Directory: $(ls -l)"
echo "Contents of site-packages: $(ls -l venv/lib/python*/site-packages)"
- name: Run tests
run: python test_hello.py

0 comments on commit 38f5941

Please sign in to comment.