From 9db445688c9e7a3c13f2c9efa211f2c58f183f05 Mon Sep 17 00:00:00 2001 From: Tushar Jain Date: Sun, 14 Jan 2024 11:01:21 +0530 Subject: [PATCH 1/3] feat: ci/cd pipeline added --- .github/workflows/main.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 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 0000000..88f36fd --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,32 @@ +name: Services +on: + push: + branches: [main] + +jobs: + build_deploy: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./frontend + steps: + - name: checkout + uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 16.14.2 + - name: Installing Dependencies + run: npm install + - name: Building + run: npm run build + - name: upload + uses: SamKirkland/FTP-Deploy-Action@v4.3.4 + with: + server: ${{ secrets.FTP_SERVER }} + username: ${{ secrets.FTP_USERNAME }} + password: ${{ secrets.FTP_PASSWORD }} + local-dir: "frontend/build/" + exclude: | + **/.git* + **/.git*/** + **/node_modules/** From 5c5502ec893e4ecef616bd90823d7f63d9071ae3 Mon Sep 17 00:00:00 2001 From: Tushar Jain Date: Sun, 14 Jan 2024 12:31:50 +0530 Subject: [PATCH 2/3] fix: package building command and naming --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 88f36fd..2fd999c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,8 +18,8 @@ jobs: - name: Installing Dependencies run: npm install - name: Building - run: npm run build - - name: upload + run: npm ci + - name: Deploying uses: SamKirkland/FTP-Deploy-Action@v4.3.4 with: server: ${{ secrets.FTP_SERVER }} From 24721d340c4a940b3cbe35fa39f53420e28b6e7b Mon Sep 17 00:00:00 2001 From: Tushar Jain Date: Mon, 15 Jan 2024 11:33:10 +0530 Subject: [PATCH 3/3] fix: installing command and removed the exclude command --- .github/workflows/main.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2fd999c..4419416 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,9 +16,9 @@ jobs: with: node-version: 16.14.2 - name: Installing Dependencies - run: npm install - - name: Building run: npm ci + - name: Building + run: npm run build - name: Deploying uses: SamKirkland/FTP-Deploy-Action@v4.3.4 with: @@ -26,7 +26,3 @@ jobs: username: ${{ secrets.FTP_USERNAME }} password: ${{ secrets.FTP_PASSWORD }} local-dir: "frontend/build/" - exclude: | - **/.git* - **/.git*/** - **/node_modules/**