From 8a1cfe45bac0abe77d7a603e5808f9b74ac8dc4e Mon Sep 17 00:00:00 2001 From: shyanukant rathi Date: Thu, 27 Jul 2023 20:48:43 +0530 Subject: [PATCH] fix error yml --- .github/workflows/deploy_test.yml | 60 +++++++++++++++---------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/deploy_test.yml b/.github/workflows/deploy_test.yml index 7e3bb727..fe5e44b1 100644 --- a/.github/workflows/deploy_test.yml +++ b/.github/workflows/deploy_test.yml @@ -2,48 +2,48 @@ name: Squib deploy and test on: push: - branches: + branches: - main - jobs: deploy_and_test: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: '3.10' - - name: Install Dependencies - run: | - python3 -m pip install --upgrade pip - pip3 install -r requirements.txt - - - name: Login to Docker Hub - uses: docker/login-action@v1 - with: + - uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.10' + + - name: Install Dependencies + run: | + python3 -m pip install --upgrade pip + pip3 install -r requirements.txt + + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_TOKEN }} - - name: Build and push Docker image - run: | - docker build -t ${{ secrets.DOCKER_USERNAME }}/squib . - docker push ${{ secrets.DOCKER_USERNAME }}/squib + - name: Build and push Docker image + run: | + docker build -t ${{ secrets.DOCKER_USERNAME }}/squib . + docker push ${{ secrets.DOCKER_USERNAME }}/squib - - name: Deploy to Heroku - env: - HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} - HEROKU_APP_NAME: squib + - name: Deploy to Heroku + env: + HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} + HEROKU_APP_NAME: squib run: | heroku container:login heroku container:push web -a $HEROKU_APP_NAME heroku container:release web -a $HEROKU_APP_NAME - - name: Run Tests - env: - SECRET_KEY: ${{ secrets.SECRET_KEY }} - run: | - cd squib - python3 manage.py test + - name: Run Tests + env: + SECRET_KEY: ${{ secrets.SECRET_KEY }} + run: | + cd squib + python3 manage.py test