From 0f2b02da7f7aae74ee91102e3c8b48c69e03648c Mon Sep 17 00:00:00 2001 From: Martin Marwad <44274319+MartinMarwad@users.noreply.github.com> Date: Tue, 20 Aug 2024 01:49:57 +0000 Subject: [PATCH] Add ci build check --- .github/workflows/build.yml | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..54e62e273 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,38 @@ +name: PR Build Check + +on: + 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@v1 + with: + node-version: '22' + + - name: Install dependencies + run: npm install + + - name: Build Docusaurus site + run: npm run build + + - name: Post success message + if: success() + uses: actions/github-script@v6 + with: + script: | + const branchName = context.payload.pull_request.head.ref; + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `Build check completed successfully for ${branchName}!` + }) \ No newline at end of file