-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (28 loc) · 909 Bytes
/
ci-cd.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Deploy to PythonAnywhere
on:
push:
branches:
- master # Adjust this to your main branch if it's different
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.10' # Specify your Python version
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Deploy to PythonAnywhere
env:
PYTHONANYWHERE_USERNAME: ${{ secrets.GuruTechDev}}
PYTHONANYWHERE_PASSWORD: ${{ secrets.gurudev@123 }}
run: |
curl -u $GuruTechDev:$gurudev@123 \
-X POST \
-F "file=@deploy.sh" \
https://www.pythonanywhere.com/api/v0/user/$.GuruTechDev/webapps/GuruTechDev.pythonanywhere.com/reload/