diff options
Diffstat (limited to '.github/workflows/ci.yaml')
| -rw-r--r-- | .github/workflows/ci.yaml | 62 |
1 files changed, 27 insertions, 35 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c3254f4..9f3980f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,51 +6,43 @@ on: pull_request: workflow_dispatch: -env: - NODE_VERSION: 20 - jobs: ci: - strategy: - matrix: - include: - - name: Build - command: build - - name: Check - command: ci - - name: ${{ matrix.name }} + name: Build site + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v4 - - name: Setup node.js - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@v11 - - name: Install pnpm - run: | - corepack enable - corepack prepare --activate + - name: Setup cache + uses: DeterminateSystems/magic-nix-cache-action@v6 - - name: Get store directory + - name: Build site run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> "$GITHUB_ENV" + nix build --print-build-logs - - name: Setup pnpm cache - uses: actions/cache@v4 - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- + check-and-lint: + name: Check & lint - - name: Install dependencies - run: | - pnpm install --frozen-lockfile + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@v11 + + - name: Setup cache + uses: DeterminateSystems/magic-nix-cache-action@v6 - - name: Run ${{ matrix.command }} + - name: Run checks run: | - pnpm run ${{ matrix.command }} + nix flake check \ + --print-build-logs \ + --show-trace |
