From 5769423020d5d6276949158b71479f8072d3d69c Mon Sep 17 00:00:00 2001 From: Steven <106362981+stevenleep@users.noreply.github.com> Date: Wed, 19 Jun 2024 11:56:21 +0800 Subject: [PATCH] Create deployment.yml --- .github/workflows/deployment.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/deployment.yml diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml new file mode 100644 index 0000000..e143bfc --- /dev/null +++ b/.github/workflows/deployment.yml @@ -0,0 +1,32 @@ +name: Deploy to Heroku + +on: + push: + branches: + - main + +jobs: + deploy: + 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.12 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Login to Heroku + env: + HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} + run: heroku auth:token + + - name: Deploy to Heroku + run: git push heroku main