diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml new file mode 100644 index 0000000..5d38f0f --- /dev/null +++ b/.github/workflows/ci-cd.yml @@ -0,0 +1,66 @@ +name: CI/CD Pipeline + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '14' + + - name: Install dependencies + run: npm install + + - name: Build project + run: npm run build + + test: + runs-on: ubuntu-latest + needs: build + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '14' + + - name: Install dependencies + run: npm install + + - name: Run tests + run: npm test + + deploy: + runs-on: ubuntu-latest + needs: test + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '14' + + - name: Install dependencies + run: npm install + + - name: Deploy to GitHub Pages + run: npm run deploy diff --git a/README.md b/README.md index 5cf7f40..9a2cb6e 100644 --- a/README.md +++ b/README.md @@ -100,3 +100,35 @@ mastery. Explore, play, and witness your progress in the pursuit of precision. Happy coding! ❤️
+ +
+ This project uses GitHub Actions for Continuous Integration (CI) and Continuous Deployment (CD). The CI/CD pipeline is defined in the .github/workflows/ci-cd.yml
file.
+
npm run build
command.
+ npm test
command.
+ npm run deploy
command.
+ + You can run the CI/CD processes locally using the following commands: +
+npm run build
+ npm test
+ npm run deploy
+