diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index df43cd70c..6aa260439 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -1,4 +1,5 @@ name: Build and Deploy + on: push: branches: @@ -6,42 +7,40 @@ on: paths: - '.github/workflows/**' - 'docs/**' - - 'yarn.lock' + - 'pnpm-lock.yaml' + # trigger deployment manually + workflow_dispatch: + jobs: build-and-deploy: runs-on: ubuntu-latest steps: - name: Checkout ⛓️ - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: persist-credentials: false submodules: true - - name: Setup Node.js - uses: actions/setup-node@v3 + - name: Setup pnpm + uses: pnpm/action-setup@v3 with: - node-version: '18' + # choose pnpm version to use + version: 8 + # install deps with pnpm + run_install: true - - name: Cache dependencies - uses: actions/cache@v3 - id: yarn-cache + - name: Setup Node.js + uses: actions/setup-node@v4 with: - path: | - **/node_modules - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - - name: Install dependencies - if: steps.yarn-cache.outputs.cache-hit != 'true' - run: yarn --frozen-lockfile + node-version: '20' + cache: pnpm - name: Build VuePress site - run: yarn docs:build + run: pnpm run docs:build # @see https://github.com/crazy-max/ghaction-github-pages - name: Deploy to GitHub Pages - uses: crazy-max/ghaction-github-pages@v2 + uses: crazy-max/ghaction-github-pages@v4 with: target_branch: gh-pages build_dir: docs/.vuepress/dist diff --git a/.github/workflows/build-only.yml b/.github/workflows/build-only.yml index 7a7f4ca98..5c8fafa3a 100644 --- a/.github/workflows/build-only.yml +++ b/.github/workflows/build-only.yml @@ -1,4 +1,5 @@ name: Build Only + on: push: branches: @@ -6,35 +7,33 @@ on: paths: - '.github/workflows/**' - 'docs/**' - - 'yarn.lock' + - 'pnpm-lock.yaml' + # trigger deployment manually + workflow_dispatch: + jobs: build: runs-on: ubuntu-latest steps: - name: Checkout ⛓️ - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: persist-credentials: false submodules: true - - name: Setup Node.js - uses: actions/setup-node@v3 + - name: Setup pnpm + uses: pnpm/action-setup@v3 with: - node-version: '18' + # choose pnpm version to use + version: 8 + # install deps with pnpm + run_install: true - - name: Cache dependencies - uses: actions/cache@v3 - id: yarn-cache + - name: Setup Node.js + uses: actions/setup-node@v4 with: - path: | - **/node_modules - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - - name: Install dependencies - if: steps.yarn-cache.outputs.cache-hit != 'true' - run: yarn --frozen-lockfile + node-version: '20' + cache: pnpm - name: Build VuePress site - run: yarn docs:build + run: pnpm run docs:build