Skip to content

Commit

Permalink
Update ci-cd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Mani121800 authored Aug 6, 2024
1 parent f39527e commit e9145f0
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: CI/CD Pipeline

on:
push:
push:
branches:
- master

Expand All @@ -23,12 +23,17 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Upload files to PythonAnywhere
env:
SSH_PRIVATE_KEY: ${{ secrets.PYTHONANYWHERE_SSH_KEY }}
run: |
echo "$SSH_PRIVATE_KEY" > private_key
chmod 600 private_key
rsync -avz -e "ssh -i private_key -o StrictHostKeyChecking=no" ./ yourusername@ssh.pythonanywhere.com:/home/yourusername/yourproject/
- name: Deploy to PythonAnywhere
- name: Reload PythonAnywhere Web App
env:
# PYTHONANYWHERE_API_TOKEN: ${{ secrets.9b8424cb0e7a9c5ff702e147ca273dd9f37e0810}}
PYTHONANYWHERE_API_TOKEN: ${{ secrets.demo }}
PYTHONANYWHERE_API_TOKEN: ${{ secrets.demo }}
run: |
curl -s https://gurutechdev.pythonanywhere.com//api/v0/user/GuruTechDev/webapps/GuruTechDev/reload/ \
curl -s -X POST https://www.pythonanywhere.com/api/v0/user/GuruTechDev/webapps/GuruTechDev/reload/ \
-H "Authorization: Token $PYTHONANYWHERE_API_TOKEN"

0 comments on commit e9145f0

Please sign in to comment.