From 3374fe33628a2fec0442a2006c98f62b4a6e2cb1 Mon Sep 17 00:00:00 2001 From: John Duprey Date: Thu, 13 Feb 2025 18:35:19 -0500 Subject: [PATCH 1/3] create build workflow --- .github/workflows/cipp_frontend_build.yml | 52 +++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/cipp_frontend_build.yml diff --git a/.github/workflows/cipp_frontend_build.yml b/.github/workflows/cipp_frontend_build.yml new file mode 100644 index 000000000000..94376c5cd75d --- /dev/null +++ b/.github/workflows/cipp_frontend_build.yml @@ -0,0 +1,52 @@ +name: CIPP Frontend Build + +on: + push: + branches: + - main + workflow_dispatch: + +permissions: + contents: write + +jobs: + build: + if: github.event.repository.fork == false + name: Build and Upload CIPP Frontend + runs-on: ubuntu-latest + + steps: + # Checkout the repository + - name: Checkout Code + uses: actions/checkout@v3 + + # Set up Node.js + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '20.18.1' + + # Install dependencies + - name: Install Dependencies + run: npm install + + # Build the project + - name: Build Project + run: npm run build + + # Create ZIP File in a New Source Directory + - name: Prepare and Zip Build Files + run: | + mkdir -p build + zip -r build/latest.zip out + + # Upload to Azure Blob Storage + - name: Azure Blob Upload + uses: LanceMcCarthy/Action-AzureBlobUpload@v3.3.0 + with: + connection_string: ${{ secrets.AZURE_CONNECTION_STRING }} + container_name: cipp + source_folder: build/ + destination_folder: / + delete_if_exists: true + From 947e52e7f89fc60bf4268598f5301c3cc3b058ba Mon Sep 17 00:00:00 2001 From: John Duprey Date: Thu, 13 Feb 2025 18:38:05 -0500 Subject: [PATCH 2/3] Update cipp_frontend_build.yml Signed-off-by: John Duprey --- .github/workflows/cipp_frontend_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cipp_frontend_build.yml b/.github/workflows/cipp_frontend_build.yml index 94376c5cd75d..89e397121333 100644 --- a/.github/workflows/cipp_frontend_build.yml +++ b/.github/workflows/cipp_frontend_build.yml @@ -28,7 +28,7 @@ jobs: # Install dependencies - name: Install Dependencies - run: npm install + run: yarn install # Build the project - name: Build Project From d8560f8c65a75efa1aa82cc40adef9f83bfd9a84 Mon Sep 17 00:00:00 2001 From: John Duprey Date: Thu, 13 Feb 2025 20:35:06 -0500 Subject: [PATCH 3/3] Update cipp_frontend_build.yml Signed-off-by: John Duprey --- .github/workflows/cipp_frontend_build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cipp_frontend_build.yml b/.github/workflows/cipp_frontend_build.yml index 89e397121333..3ba6517c337b 100644 --- a/.github/workflows/cipp_frontend_build.yml +++ b/.github/workflows/cipp_frontend_build.yml @@ -38,6 +38,7 @@ jobs: - name: Prepare and Zip Build Files run: | mkdir -p build + cp staticwebapp.config.json out/ zip -r build/latest.zip out # Upload to Azure Blob Storage