Skip to content

build: add packageManager field & simplify deploy.yml (#12) #49

build: add packageManager field & simplify deploy.yml (#12)

build: add packageManager field & simplify deploy.yml (#12) #49

Workflow file for this run

name: Deploy VitePress Preview Site
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: pnpm install
working-directory: site
- name: Build with VitePress
run: pnpm run build
working-directory: site
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: site/.vitepress/dist
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4