File tree 1 file changed +8
-8
lines changed
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -2,13 +2,13 @@ name: Django CI
2
2
3
3
on :
4
4
push :
5
- branches : [ "main" ]
5
+ branches : [ "main", "staging" ]
6
6
pull_request :
7
- branches : [ "main" ]
7
+ branches : [ "main", "staging" ]
8
8
9
9
jobs :
10
10
build :
11
- environment : production
11
+ environment : ${{ github.ref_name }}
12
12
name : " Deploy to production"
13
13
runs-on : ubuntu-latest
14
14
steps :
@@ -19,18 +19,18 @@ jobs:
19
19
SSH_HOST : ${{ secrets.SSH_HOST }}
20
20
run : |
21
21
mkdir -p ~/.ssh/
22
- echo "$SSH_KEY" > ~/.ssh/production .key
23
- chmod 600 ~/.ssh/production .key
22
+ echo "$SSH_KEY" > ~/.ssh/server .key
23
+ chmod 600 ~/.ssh/server .key
24
24
cat >>~/.ssh/config <<END
25
- Host production
25
+ Host server
26
26
HostName $SSH_HOST
27
27
User $SSH_USER
28
- IdentityFile ~/.ssh/production .key
28
+ IdentityFile ~/.ssh/server .key
29
29
StrictHostKeyChecking no
30
30
END
31
31
- name : Deploy to Server
32
32
run : |
33
- ssh production '
33
+ ssh server '
34
34
cd /home/django/bakeup/ &&
35
35
git pull origin main &&
36
36
source /home/django/djangoenv/bin/activate &&
You can’t perform that action at this time.
0 commit comments