From c646cdd36d70d20f78b35becadb6ebdfb53d19a2 Mon Sep 17 00:00:00 2001 From: ightevenmckane187 Date: Sun, 9 Aug 2026 14:23:26 -0500 Subject: [PATCH] Add CI/CD workflow for CypherTube project but This workflow automates the CI/CD process for the CypherTube project, including steps for checking out the repository, setting up the Node.js environment, installing dependencies, running linting and security audits, executing tests, building artifacts, and uploading the build artifact. --- .github/workflows/main.yml | 43 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000000..bbbf8060d337 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,43 @@ +name: CypherTube CI/CD Pipeline + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + workflow_dispatch: + +jobs: + build-and-test: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js Environment + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm ci || npm install + + - name: Run code linting & security audit + run: | + npm run lint --if-present + npm audit --audit-level=high --if-present + + - name: Run test suite + run: npm test --if-present + + - name: Build production artifacts + run: npm run build --if-present + + - name: Upload Build Artifact + uses: actions/upload-artifact@v4 + with: + name: build-artifact + path: dist/ # Adjust to 'build/' or public directory depending on your framework + retention-days: 7