Skip to content

Commit

Permalink
refactor :.github/workflows/pull-request.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Rukhsarkh committed Jan 3, 2025
1 parent 64dd280 commit 6ca8d4a
Showing 1 changed file with 9 additions and 19 deletions.
28 changes: 9 additions & 19 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
for file in ${CHANGED_UNAUTH_FILES}; do
echo "$file is unauthorized to change/delete"
done
echo "To override this, apply the 'ignore-sensitive-files-pr' label"
echo "To override this, apply the 'ignore-sensitive-files-pr' label"
exit 1
Count-Changed-Files:
if: ${{ github.actor != 'dependabot[bot]' }}
Expand Down Expand Up @@ -393,31 +393,27 @@ jobs:
needs: [Code-Quality-Checks, Test-Application]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
- name: Cache TypeDoc packages
- name: Cache global npm packages
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-typedoc-${{ hashFiles('**/package-lock.json') }}
path: ~/.npm-global
key: ${{ runner.os }}-node-global-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-typedoc-
${{ runner.os }}-node-global-
- name: Generate Documentation
run: |
npm config set prefix ~/.npm-global
# Install required dependencies
if ! npm install -g typedoc typedoc-plugin-markdown; then
echo "Failed to install TypeDoc dependencies"
exit 1
fi
# Create auto-docs directory if it doesn't exist
if ! mkdir -p docs/docs/auto-docs; then
echo "Failed to create auto-docs directory"
exit 1
fi
mkdir -p docs/docs/auto-docs
# Generate documentation using TypeDoc
typedoc \
--out docs/docs/auto-docs \
Expand Down Expand Up @@ -454,7 +450,7 @@ jobs:
echo "Committing changes to documentation"
git commit -m "chore(docs): update auto-generated API documentation [skip ci]"
# Push to the feature branch
if ! git push origin "${HEAD_RED}"; then
if ! git push origin "${HEAD_REF}"; then
echo "failed to push the changes"
exit 1
fi
Expand All @@ -463,13 +459,7 @@ jobs:
name: Validate CodeRabbit Approval
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]'
needs:
[
Code-Quality-Checks,
Test-Application,
Start-App-Without-Docker,
Docker-Start-Check,
]
needs: [Code-Quality-Checks, Test-Application, Start-App-Without-Docker, Docker-Start-Check]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand Down

0 comments on commit 6ca8d4a

Please sign in to comment.