Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

Update README.md

Update README.md #101

name: Build & Deploy
on:
push:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 22
- name: install pnpm
run: npm i -g pnpm
- name: Get pnpm store directory
id: pnpm-cache-dir
shell: bash
run: echo "STORE_PATH=$(pnpm store path --silent)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v4
name: Setup pnpm cache
id: pnpm-cache
with:
path: ${{ steps.pnpm-cache-dir.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**/package.json') }}
restore-keys: ${{ runner.os }}-pnpm-store
- name: Install packages
if: steps.pnpm-cache.outputs.cache-hit != 'true'
run: pnpm i
- name: run pnpm build
run: pnpm run build
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist