Skip to content

Converted docusaurus to pnpm #1

Converted docusaurus to pnpm

Converted docusaurus to pnpm #1

Workflow file for this run

##############################################################################
##############################################################################
#
# 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:
- name: Checkout the Repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all branches and tags
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
cache: pnpm
cache-dependency-path: |
pnpm-lock.yaml
package.json
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
# 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