-
-
Notifications
You must be signed in to change notification settings - Fork 848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pull-request.yml updated #3289
pull-request.yml updated #3289
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
############################################################################## | ||
############################################################################## | ||
# | ||
# NOTE! | ||
|
@@ -421,22 +421,29 @@ | |
name: Test Deployment to https://docs-admin.talawa.io | ||
runs-on: ubuntu-latest | ||
needs: [Docker-Start-Check, Start-App-Without-Docker] | ||
# Run only if the develop-postgres branch and not dependabot | ||
# Run only if the develop-postgres branch and not dependabot | ||
if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.base.ref == 'develop-postgres' }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
- name: Checkout the Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '22.x' | ||
cache: yarn | ||
cache-dependency-path: 'docs/' | ||
# Run Docusaurus in the ./docs directory | ||
node-version: '20.x' | ||
|
||
- name: Install dependencies | ||
working-directory: ./docs | ||
run: yarn install --frozen-lockfile | ||
run: npm install | ||
|
||
- name: Test building the website | ||
working-directory: ./docs | ||
run: yarn build | ||
run: npm run build | ||
|
||
- name: Check for Node.js memory issues | ||
run: | | ||
node --max-old-space-size=4096 ./node_modules/.bin/docusaurus build | ||
|
||
Comment on lines
+443
to
+446
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Remove redundant build step. The additional build step with memory allocation is redundant as it runs after the previous build step. This could potentially:
Instead, modify the original build step to include the memory allocation: - name: Test building the website
working-directory: ./docs
- run: npm run build
+ run: node --max-old-space-size=4096 ./node_modules/.bin/docusaurus build
|
||
|
||
Check-Target-Branch: | ||
if: ${{ github.actor != 'dependabot[bot]' }} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
While changing to Node.js 20.x is correct, the same update is needed in other workflow files that still reference version 22:
.github/workflows/push-deploy-website.yml
: Line containingnode-version: 22
.github/workflows/push.yml
: Line containingnode-version: [22.x]
🔗 Analysis chain
Good fix! Node.js version change is appropriate.
Changing from Node.js 22.x to 20.x is correct as:
Let's verify the Node.js version compatibility with all dependencies:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 98
Script:
Length of output: 764
🧰 Tools
🪛 yamllint (1.35.1)
[error] 433-433: trailing spaces
(trailing-spaces)