Skip to content

chore: migrate to Vite+ (#639) #589

chore: migrate to Vite+ (#639)

chore: migrate to Vite+ (#639) #589

Workflow file for this run

name: Deploy chibivue Book to Pages
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Check if it's the original repo and the main branch
run: |
if [[ "${{ github.repository }}" == "ubugeeei/chibivue" && "${{ github.ref }}" == "refs/heads/main" ]]; then
echo "This is the original repo's main branch, running the workflow."
else
echo "This is a fork or a different branch, skipping the workflow."
exit 0
fi
- name: Setup Vite+
uses: voidzero-dev/setup-vp@v1
with:
node-version: "24"
cache: true
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Install dependencies
run: vp install
- name: Build with VitePress
run: vp run book:build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: book/online-book/.vitepress/dist
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4