Files
oniagent/ONIModTutorial/ONIModTutorial-main/.github/workflows/deploy.yml
2026-05-30 11:00:36 +08:00

51 lines
1.0 KiB
YAML

name: Deploy VitePress site to Pages
on:
push:
branches: [main]
concurrency:
group: "pages"
cancel-in-progress: true
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm install
- name: Build with VitePress
run: npx vitepress build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: .vitepress/dist
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4