-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (26 loc) · 836 Bytes
/
Copy pathNginx_setup.yml
File metadata and controls
31 lines (26 loc) · 836 Bytes
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
name: Configure Nginx
on:
push:
branches:
- main
paths:
- 'nginx_setup_script.sh'
jobs:
deploy:
runs-on: self-hosted
env:
DEPLOY_PATH: "/home/ubuntu/DevCamper-API"
GH_PAT: ${{ secrets.GH_PAT }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Ensure Repository Exists
run: |
if [ ! -d "$DEPLOY_PATH" ]; then
git clone https://x-access-token:${GH_PAT}@github.com/SymonMuchemi/DevCamper-API.git $DEPLOY_PATH
fi
- name: Run config script
run: |
cd $DEPLOY_PATH
chmod +x nginx_setup_script.sh
./nginx_setup_script.sh