diff --git a/.github/workflows/deploy-github-pages.yml b/.github/workflows/deploy-github-pages.yml index d8f9aa4..f49233e 100644 --- a/.github/workflows/deploy-github-pages.yml +++ b/.github/workflows/deploy-github-pages.yml @@ -9,43 +9,34 @@ permissions: contents: read jobs: - setup: - name: Setup environment - runs-on: ubuntu-latest - steps: - - name: Installing node.js - uses: actions/setup-node@v1 # Used to install node environment - with: - node-version: "10.x" - run-documentation: name: Run documentation runs-on: ubuntu-latest - needs: setup # Need to wait for setup permissions: contents: write steps: - - uses: actions/checkout@v1 # Get last commit pushed + - uses: actions/checkout@v4 - - name: Get yarn cache - id: yarn-cache - run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: pnpm/action-setup@v6 + name: Install pnpm + with: + version: 11.2.2 - - uses: actions/cache@v4 + - name: Setup Node + uses: actions/setup-node@v4 with: - path: ${{ steps.yarn-cache.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- + node-version-file: .nvmrc + cache: pnpm + cache-dependency-path: pnpm-lock.yaml - name: Install dependencies - run: yarn install + run: pnpm install --frozen-lockfile - name: Run documentation create - run: yarn docusaurus:generate + run: pnpm run docusaurus:generate - name: Run docusaurus build - run: yarn docusaurus:build + run: pnpm run docusaurus:build - name: Deploy 🚀 uses: JamesIves/github-pages-deploy-action@v4 diff --git a/package.json b/package.json index ed09c34..8cfe33e 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "scripts": { "dev": "pnpm docusaurus:start", "build": "rm -rf dist/; npm run generate-index; tsup", - "prepublishOnly": "yarn build", + "prepublishOnly": "pnpm run build", "test:ci": "jest --no-cache", "test:clear": "jest --clearCache", "docusaurus": "docusaurus",