Skip to content

Commit

Permalink
ci: fix pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
floydspace committed Jan 26, 2025
1 parent 2368d86 commit 27a63bf
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 32 deletions.
12 changes: 4 additions & 8 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,18 @@ inputs:
node-version:
description: The version of Node.js to install
required: true
default: 18.17.0
default: 20.14.0

runs:
using: composite
steps:
- name: Install pnpm
uses: pnpm/action-setup@v2
id: pnpm-install
with:
version: 8
run_install: false
uses: pnpm/action-setup@v4
- name: Install node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: ${{ inputs.node-version }}
- name: Install dependencies
shell: bash
run: pnpm install --ignore-scripts
run: pnpm install
8 changes: 5 additions & 3 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions: {}

jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/actions/setup
- run: pnpm docgen
Expand All @@ -31,7 +33,7 @@ jobs:
destination: ./_site
- name: Upload pages artifact
if: github.repository_owner == 'floydspace' && github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3

deploy:
if: github.repository_owner == 'floydspace' && github.event_name == 'push' && github.ref == 'refs/heads/main'
Expand All @@ -48,4 +50,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
28 changes: 7 additions & 21 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,18 @@ jobs:

strategy:
matrix:
node-version: [18.17.0]
node-version: [18.20.4, 20.18.0, 22.11.0]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
name: Install pnpm
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- run: pnpm install
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run build

0 comments on commit 27a63bf

Please sign in to comment.