Converted docusaurus to pnpm #7
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ############################################################################## | |
| ############################################################################## | |
| # | |
| # NOTE! | |
| # | |
| # Please read the README.md file in this directory that defines what should | |
| # be placed in this file | |
| # | |
| ############################################################################## | |
| ############################################################################## | |
| name: PR Workflow | |
| on: | |
| pull_request: | |
| branches: | |
| - '**' | |
| env: | |
| CODECOV_UNIQUE_NAME: CODECOV_UNIQUE_NAME-${{ github.run_id }}-${{ github.run_number }} | |
| jobs: | |
| Code-Quality-Checks: | |
| name: Performs linting, formatting, type-checking, checking for different source and target branch | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check if the source and target branches are different | |
| if: ${{ github.event.pull_request.base.ref == github.event.pull_request.head.ref }} | |
| run: | | |
| echo "Source Branch ${{ github.event.pull_request.head.ref }}" | |
| echo "Target Branch ${{ github.event.pull_request.base.ref }}" | |
| echo "Error: Source and Target Branches are the same. Please ensure they are different." | |
| echo "Error: Close this PR and try again." | |
| exit 1 | |
| Test-Docusaurus-Deployment: | |
| name: Test Deployment to https://developer.palisadoes.org | |
| runs-on: ubuntu-latest | |
| needs: [Code-Quality-Checks] | |
| strategy: | |
| matrix: | |
| node-version: ['24.x'] | |
| # Run only if the develop branch and not dependabot | |
| if: ${{ github.event.pull_request.base.ref == 'main' }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| cache: pnpm | |
| cache-dependency-path: | | |
| pnpm-lock.yaml | |
| package.json | |
| # Run Docusaurus in the ./docs directory | |
| - name: Install dependencies | |
| working-directory: ./ | |
| run: pnpm install --frozen-lockfile | |
| - name: Test building the website | |
| working-directory: ./ | |
| run: pnpm build | |
| Check-Target-Branch: | |
| if: ${{ github.actor != 'dependabot[bot]' }} | |
| name: Check Target Branch | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check if the target branch is 'main' | |
| if: github.event.pull_request.base.ref != 'main' | |
| run: | | |
| echo "Error: Pull request target branch must be 'main'. Please refer PR_GUIDELINES.md" | |
| echo "Error: Close this PR and try again." | |
| exit 1 |