Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit 8f2e6fb

Browse files
author
Charlie
committed
Server setup?
1 parent cdc49e1 commit 8f2e6fb

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

.github/workflows/django.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
python-version: [3.8,3.9]
15+
python-version: [3.8, 3.9]
1616
steps:
1717
- uses: actions/checkout@v4
1818
- name: Set up Python ${{ matrix.python-version }}
@@ -31,7 +31,7 @@ jobs:
3131
needs: build
3232
strategy:
3333
matrix:
34-
python-version: [3.8,3.9]
34+
python-version: [3.8, 3.9]
3535
steps:
3636
- uses: actions/checkout@v4
3737
- name: Set up Python ${{ matrix.python-version }}
@@ -47,3 +47,23 @@ jobs:
4747
run: |
4848
pytest
4949
working-directory: ./CargoHub
50+
51+
# Deploy Job
52+
deploy:
53+
runs-on: ubuntu-latest
54+
needs: test
55+
steps:
56+
- name: Checkout code
57+
uses: actions/checkout@v4
58+
59+
- name: SSH into server and deploy
60+
uses: appleboy/ssh-action@v0.1.0
61+
with:
62+
host: ${{ secrets.SERVER_IP }}
63+
username: ${{ secrets.SERVER_USER }}
64+
key: ${{ secrets.SERVER_SSH_KEY }}
65+
script: |
66+
cd /path/to/your/repo # Change to your Django project directory
67+
git pull origin Refactoring # Pull the latest changes from the Refactoring branch
68+
source /path/to/venv/bin/activate # Activate the virtual environment
69+
pip install -r requirements.txt # Install any new dependen

0 commit comments

Comments
 (0)