mirror of
https://github.com/ZiuChen/ZiuChen.github.io.git
synced 2025-08-17 23:19:55 +08:00
36 lines
682 B
YAML
36 lines
682 B
YAML
name: Build and deploy
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
Build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Use Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '18'
|
|
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v4
|
|
id: pnpm-install
|
|
with:
|
|
version: 8
|
|
run_install: true
|
|
|
|
- name: Build VitePress site
|
|
run: pnpm run build
|
|
|
|
- name: Deploy Github Pages
|
|
uses: JamesIves/github-pages-deploy-action@releases/v4
|
|
with:
|
|
folder: docs/.vitepress/dist
|
|
branch: gh-pages
|