This repository has been archived by the owner on May 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
84 lines (63 loc) · 1.99 KB
/
ci.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: CI
on:
push:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out branch
uses: actions/checkout@v4
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: 18
# - name: Setup .NET
# uses: actions/setup-dotnet@v3
# with:
# dotnet-version: "6.x.x"
# - name: Generate Certificates
# run: dotnet dev-certs https --export-path ./cert/cert.crt --no-password --format PEM
- name: Install
run: npm ci
- name: Build Sitefinity React Framework
run: npm run build
env:
ENVIRONMENT: production
- name: Lint
run: npm run lint
- name: Test
run: npm run test
- name: Build
run: npm run build
env:
ENVIRONMENT: production
- name: Build package
run: |
rm -rf ../dist
cd ./src/nextjs-framework
tsc
cd ../../../
cp ./nextjs-renderer/src/nextjs-framework/package.json ./dist/package.json
cd ./dist
npm pack
- name: Update template repository
run: |
rm -rf ../starter
git clone https://github.com/Gebov/nextjs-renderer-starter.git ../starter
cp -R -v ./src/app/ ../starter/src/app/
declare -a filestocopy=(".env.development" ".env.production" "server.js" "package.json" "next.config.js" "tsconfig.json")
for i in "${filestocopy[@]}"
do
cp -v ./$i ../starter/$i
done
cd ../starter
npm install ../dist
npm run build
- name: Copy package
run: cp ../dist/progress-sitefinity-react-framework* ./
- name: Archive package
uses: actions/upload-artifact@v3
with:
name: sitefinity-react-framework
path: ./progress-sitefinity-react-framework*