Skip to content

ci: fix pnpm caching #90

ci: fix pnpm caching

ci: fix pnpm caching #90

Workflow file for this run

name: deploy-pages
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build-and-deploy:
name: main - Build and deploy
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: cloning repo 🛎
uses: actions/checkout@v3
# Sadly we need this BEFORE actions/setup-node to enable pnpm caching
# wait until https://github.com/actions/setup-node/pull/651 is merged before remove
- uses: pnpm/action-setup@v2
with:
version: 7
- name: Setup Node
uses: actions/setup-node@v3
with:
cache: 'pnpm'
node-version-file: '.nvmrc'
# See line :18
# - name: Enable Node package managers
# shell: bash
# run: corepack enable
- name: Install dependencies
shell: bash
run: pnpm install
- name: Lint
shell: bash
run: pnpm lint
- name: Typecheck
shell: bash
run: pnpm typecheck
- name: Build
shell: bash
run: pnpm build
- name: deploy to github pages 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
folder: dist # The folder the action should deploy.