Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Fix GitHub Action Certs Issue #52

Fix GitHub Action Certs Issue

Fix GitHub Action Certs Issue #52

Workflow file for this run

name: Ensure React Project Builds
on:
push:
branches: ["dev", "main"]
pull_request:
branches: ["dev", "main"]
env:
DOTNET_CORE_VERSION: 8.0.x
WORKING_DIRECTORY: ./src/EducationTrail/ClientApp
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_CORE_VERSION }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Generate and Install ASP.NET Cert
run: |
dotnet dev-certs https --clean
dotnet dev-certs https --export-path ~/.aspnet/https --format Pem --no-password
- name: Rename Certificate and Key Files
run: |
mv ~/.aspnet/https/localhost.crt ~/.aspnet/https/react-ts.pem
mv ~/.aspnet/https/localhost.key ~/.aspnet/https/react-ts.key
- name: Test vite+react Project
run: |
npm ci --prefix "${{ env.WORKING_DIRECTORY }}"
npm run build --prefix "${{ env.WORKING_DIRECTORY }}"