生成ssh key
ssh-keygen -t ed25519 -C "example@example.com" -f ./id_ed25519
在Potato-DiGua/Potato-DiGua.github.io上配置
github action 配置
yaml
name: Deploy
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 20
- run: npm i pnpm -g
- run: pnpm install --frozen-lockfile
- name: Build
run: pnpm docs:build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: .vitepress/dist
ssh-key: ${{ secrets.PUBLISH_TOKEN }}
branch: main
repository-name: Potato-DiGua/Potato-DiGua.github.io