Skip to content

Commit

Permalink
fix error yml
Browse files Browse the repository at this point in the history
  • Loading branch information
shyanukant committed Jul 27, 2023
1 parent 1215b23 commit 8a1cfe4
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions .github/workflows/deploy_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8a1cfe4

Please sign in to comment.