The project does not currently have a CI/CD setup in place. As a next step, consider implementing CI/CD automation for the project to streamline the development workflow. Below is a structured approach to get started with CI/CD automation scripts for the project.

Next Steps for CI/CD Setup

  1. Define CI/CD Goals: Determine the objectives for automation, such as automated testing, build processes, and deployment.

  2. Choose a CI/CD Tool: Decide whether to use GitHub Actions, CircleCI, Travis CI, etc. For this example, we will utilize GitHub Actions due to the existing .github/ directory.

  3. Create Workflow Files: The workflow file defines the automation process. A minimal setup can be initiated using the existing .github/workflows/publish.yaml file.

  4. Example Workflow: Below is an example GitHub Actions workflow that could be extended for CI/CD purposes, found in .github/workflows/publish.yaml.

name: CI/CD Pipeline

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v2
      
      - name: Set up Node.js
        uses: actions/setup-node@v2
        with:
          node-version: '14'

      - name: Install Dependencies
        run: |
          cd embed
          npm install
      
      - name: Build Project
        run: |
          cd embed
          npm run build

      - name: Run Tests
        run: |
          cd embed
          npm run test

      - name: Deploy
        if: github.event_name == 'push'
        run: |
          echo "Deployment step would go here."

Key Components Explained

  • Triggers: The workflow is triggered on push and pull_request events on the main branch.

  • Jobs: A single job named build runs on the latest version of Ubuntu.

  • Checkout Code: Uses actions/checkout@v2 to pull the project code.

  • Node Setup: The workflow uses actions/setup-node@v2 to set the Node.js environment.

  • Install Dependencies: Installs necessary packages by navigating into the embed directory and running npm install.

  • Build Project: This step builds the project with npm run build. Ensure that the build script is defined in embed/package.json.

  • Run Tests: Executes tests using npm run test. Ensure that tests are defined in the package.json.

  • Deployment Placeholder: A placeholder is included to indicate where deployment procedures should be included. This needs to be tailored according to the chosen deployment strategy.

Example Package JSON

The following example illustrates what the scripts section might look like in embed/package.json pertaining to build and test processes:

{
  "name": "embed",
  "version": "1.0.0",
  "scripts": {
    "build": "vite build",
    "test": "jest"
  },
  "devDependencies": {
    "vite": "^2.6.14",
    "jest": "^27.0.6"
  }
}

In summary, while CI/CD is not currently set up, the information provided outlines a thorough overview of how to start setting up CI/CD automation for the project, utilizing GitHub Actions along with TypeScript and HTML components.

Source: Project directory structure provided.