Skip to content

Merge pull request #117 from KelvinTegelaar/dev #6

Merge pull request #117 from KelvinTegelaar/dev

Merge pull request #117 from KelvinTegelaar/dev #6

name: CIPP Frontend Dev Build
on:
push:
branches:
- dev
workflow_dispatch:
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/[email protected]
# Set up Node.js
- name: Get Node version
id: get_node_version
run: |
node_raw_version=$(node -p "require('./package.json').engines.node")
node_sanitized_version=$(echo $node_raw_version | sed -E 's/[^0-9.]+//g')
echo "node_version=$node_sanitized_version" >> $GITHUB_OUTPUT
- name: Set up Node.js
uses: actions/[email protected]
with:
node-version: ${{ steps.get_node_version.outputs.node_version }}
# Install dependencies
- name: Install Dependencies
run: yarn 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
cp staticwebapp.config.json out/
zip -r build/dev.zip out
# Upload to Azure Blob Storage
- name: Azure Blob Upload
uses: LanceMcCarthy/[email protected]
with:
connection_string: ${{ secrets.AZURE_CONNECTION_STRING }}
container_name: cipp
source_folder: build/
destination_folder: /
delete_if_exists: true