This repository has been archived by the owner on May 8, 2024. It is now read-only.
Merge remote-tracking branch 'origin/main' into gebov/test-ci #215
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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* |