From 008c7d2501b5e01ed0995cc6babfc849bc0f9daf Mon Sep 17 00:00:00 2001 From: rohithkv01 Date: Sat, 31 Oct 2026 14:52:10 +0530 Subject: [PATCH 1/2] Add GitHub Actions CI CD pipeline --- .github/workflows/deploy.yml | 57 ++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..91118f1 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,57 @@ + +name: Calculator CI/CD Pipeline + +on: + push: + branches: + - main + pull_request: + branches: + - main + +permissions: + contents: read + +jobs: + build-and-test: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Check Project Files + run: | + test -f index.html + test -f styles.css + test -f script.js + + - name: Check JavaScript Syntax + run: node --check script.js + + - name: Prepare Website Artifact + uses: actions/upload-pages-artifact@v3 + with: + path: . + + deploy: + needs: build-and-test + runs-on: ubuntu-latest + + permissions: + pages: write + id-token: write + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 From 020ddd63390cb2fa0b3ceb3e7ae6ef547a2a62c1 Mon Sep 17 00:00:00 2001 From: Konda Venkata Pavan Rohith Ratna Date: Sat, 31 Oct 2026 15:26:36 +0530 Subject: [PATCH 2/2] comitted --- .github/workflows/deploy.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 91118f1..e0e8f93 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -40,6 +40,7 @@ jobs: path: . deploy: + if: github.event_name == 'push' needs: build-and-test runs-on: ubuntu-latest @@ -52,6 +53,9 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} steps: + - name: Setup GitHub Pages + uses: actions/configure-pages@v5 + - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4