From b1f3bbd1316202adead4ad436382d467d4c3c3b0 Mon Sep 17 00:00:00 2001 From: Md Imran Date: Tue, 2 Jul 2024 18:57:16 +0530 Subject: [PATCH 1/4] Create build-test.yaml --- .github/workflows/build-test.yaml | 41 +++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/build-test.yaml diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml new file mode 100644 index 00000000..66bad41d --- /dev/null +++ b/.github/workflows/build-test.yaml @@ -0,0 +1,41 @@ +name: Build and Serve Docusaurus Website + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build-and-serve: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Node.js 20.14 + uses: actions/setup-node@v2 + with: + node-version: '20.14' + + - name: Install dependencies + run: npm install + + - name: Build website + run: npm run build + + - name: Start Docusaurus server + run: npm run serve -- --host 0.0.0.0 + + - name: Wait for Docusaurus to start + run: sleep 5 # Adjust as needed based on your server startup time + + - name: Test Docusaurus website + run: | + curl -IsS http://localhost:3000 | head -n 1 | grep "200 OK" + + - name: Shutdown Docusaurus server + run: npm run clear # Replace with your shutdown command if needed From 7e5bb8347dafd3e5af3f0097b372e79d825d9663 Mon Sep 17 00:00:00 2001 From: Md Imran Date: Tue, 2 Jul 2024 18:58:29 +0530 Subject: [PATCH 2/4] Update build-test.yaml --- .github/workflows/build-test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index 66bad41d..0c79f246 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -3,10 +3,10 @@ name: Build and Serve Docusaurus Website on: push: branches: - - main + - master pull_request: branches: - - main + - master jobs: build-and-serve: From 1cd60f47522b8477e276f672f3dd2801437ae686 Mon Sep 17 00:00:00 2001 From: Md Imran Date: Tue, 2 Jul 2024 19:30:52 +0530 Subject: [PATCH 3/4] fix(): build fix Signed-off-by: Md Imran --- .github/workflows/build-test.yaml | 41 ------------------------------- prod.dockerfile | 2 +- 2 files changed, 1 insertion(+), 42 deletions(-) delete mode 100644 .github/workflows/build-test.yaml diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml deleted file mode 100644 index 0c79f246..00000000 --- a/.github/workflows/build-test.yaml +++ /dev/null @@ -1,41 +0,0 @@ -name: Build and Serve Docusaurus Website - -on: - push: - branches: - - master - pull_request: - branches: - - master - -jobs: - build-and-serve: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Set up Node.js 20.14 - uses: actions/setup-node@v2 - with: - node-version: '20.14' - - - name: Install dependencies - run: npm install - - - name: Build website - run: npm run build - - - name: Start Docusaurus server - run: npm run serve -- --host 0.0.0.0 - - - name: Wait for Docusaurus to start - run: sleep 5 # Adjust as needed based on your server startup time - - - name: Test Docusaurus website - run: | - curl -IsS http://localhost:3000 | head -n 1 | grep "200 OK" - - - name: Shutdown Docusaurus server - run: npm run clear # Replace with your shutdown command if needed diff --git a/prod.dockerfile b/prod.dockerfile index 54c054f7..2691dd14 100644 --- a/prod.dockerfile +++ b/prod.dockerfile @@ -1,4 +1,4 @@ -FROM node:20.14-bookworm-slim as builder +FROM node:16.14.0-alpine3.15 as builder WORKDIR /build COPY package.json ./ COPY package-lock.json ./ From 87a4f9fc549ac6e9380654cdc0d8a461394a009f Mon Sep 17 00:00:00 2001 From: Md Imran Date: Tue, 2 Jul 2024 19:33:15 +0530 Subject: [PATCH 4/4] fix(): docker update Signed-off-by: Md Imran --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2dc6d57e..596ae5b0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20.15-bookworm-slim as builder +FROM node:16.14.0-alpine3.15 as builder WORKDIR /build COPY . ./ COPY ./images/ ./static/images