-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.21 KB
/
deploy.yml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Deploy on PR Merge
on:
push:
branches:
- master
pull_request:
types:
- closed
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Check for Changes in frontEnd folder
run: |
if git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '^frontEnd/' &> /dev/null; then
echo "Changes detected in the frontEnd folder. Proceeding with deployment."
else
echo "No changes in the frontEnd folder. Skipping deployment."
fi
- name: Set CI Environment Variable
run: echo "CI=false" >> $GITHUB_ENV
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 14
- name: Set git configuration
run: git config --global user.email rajpunjabi47@yahoo.in && git config --global user.name "Raj Punjabi"
- name: Install Dependencies
run: |
cd frontEnd
npm install --save gh-pages
- name: build application
run: |
cd frontEnd
npm run build
- name: Run Deploy Script
run: |
cd frontEnd
npm run deploy