Skip to content

Commit d0f21cd

Browse files
Merge pull request #8 from AnderssonProgramming/fix/integrate_and_api_call_refactor
Fix/integrate and api call refactor
2 parents 389e95c + 6af71ce commit d0f21cd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+25336
-1244
lines changed

.github/workflows/ci-cd.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: CI/CD Pipeline ELysium
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- develop
10+
- main
11+
12+
env:
13+
AZURE_WEBAPP_NAME: elysiumFrontEnd
14+
AZURE_WEBAPP_PACKAGE_PATH: '.'
15+
NODE_VERSION: '18.x'
16+
17+
jobs:
18+
build-and-deploy:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
24+
- uses: azure/login@v1
25+
with:
26+
creds: ${{ secrets.AZURE_CREDENTIALS }}
27+
28+
- name: Cache Node.js modules
29+
uses: actions/cache@v3
30+
with:
31+
path: ~/.npm
32+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
33+
restore-keys: |
34+
${{ runner.os }}-node-
35+
36+
- name: Setup Node.js
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: ${{ env.NODE_VERSION }}
40+
cache: 'npm'
41+
42+
- name: Install dependencies
43+
run: npm install
44+
45+
- name: Run tests
46+
run: npm run test --if-present
47+
48+
- name: Build project
49+
run: npm run build --if-present
50+
51+
- name: Deploy to Azure Web Apps
52+
uses: azure/webapps-deploy@v3
53+
with:
54+
app-name: ${{ env.AZURE_WEBAPP_NAME }}
55+
package: ./build
56+
57+
- name: Logout from Azure
58+
run: az logout

0 commit comments

Comments
 (0)