File tree Expand file tree Collapse file tree 2 files changed +39
-14
lines changed
Expand file tree Collapse file tree 2 files changed +39
-14
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy Zodiac Server
2+
3+ on :
4+ push :
5+ branches :
6+ - dev_hari
7+ - dev-fan
8+ - dev_mario
9+ - dev_fang
10+
11+ jobs :
12+ deploy :
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - name : Check out the repository
17+ uses : actions/checkout@v3
18+
19+ - name : Install dependencies
20+ run : yarn install --frozen-lockfile
21+
22+ - name : Build React App
23+ run : yarn build
24+
25+ - name : Determine Branch Name
26+ id : get_branch
27+ run : echo "branch_name=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
28+
29+ - name : Copy files to the server via SFTP
30+ 31+ with :
32+ server : ${{ secrets.NEUROJ_SERVER }}
33+ username : ${{ secrets.NEUROJ_SERVER_USER }}
34+ ssh_private_key : ${{ secrets.NEUROJ_SERVER_SSH_KEY }}
35+ local_path : " ./build/*"
36+ remote_path : " /var/www/html/dev/${{ env.branch_name }}/"
Original file line number Diff line number Diff line change 55 branches :
66 - " *"
77
8- push :
9- branches :
10- - main # Runs on push to main
11-
128jobs :
139 validate :
1410 runs-on : ubuntu-latest
@@ -25,18 +21,11 @@ jobs:
2521 - name : Install dependencies
2622 run : yarn install
2723
24+ - name : Run Linter (Report Issues)
25+ run : yarn lint
26+
2827 - name : Compile TypeScript
2928 run : yarn build
3029
3130 - name : Run Security Audit
3231 run : yarn audit --level moderate
33-
34- - name : Copy files to the server via SFTP
35- if : github.ref == 'refs/heads/main'
36- 37- with :
38- server : ${{ secrets.NEUROJ_SERVER }}
39- username : ${{ secrets.NEUROJ_SERVER_USER }}
40- ssh_private_key : ${{ secrets.NEUROJ_SERVER_SSH_KEY }}
41- local_path : " ./*"
42- remote_path : " /var/www/html/dev/${{ github.actor }}/"
You can’t perform that action at this time.
0 commit comments