Skip to content

Commit

Permalink
github action
Browse files Browse the repository at this point in the history
  • Loading branch information
jevantang committed Oct 1, 2024
1 parent 0f58926 commit 4d84cea
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy Pages
name: Deploy VitePress site to Pages

on:
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
Expand Down Expand Up @@ -27,27 +27,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0 # Not needed if lastUpdated is not enabled
# - uses: pnpm/action-setup@v2 # Uncomment this if you're using pnpm
- uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
# - name: Setup Node
# uses: actions/setup-node@v3
# with:
# node-version: 18
# cache: npm # or pnpm / yarn
# - uses: pnpm/action-setup@v3 # Uncomment this if you're using pnpm
# - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm # or pnpm / yarn
- name: Setup Pages
uses: actions/configure-pages@v3
uses: actions/configure-pages@v4
- name: Install dependencies
run: bun install # npm ci or pnpm install / yarn install / bun install
run: npm ci # or pnpm install / yarn install / bun install
- name: Build with VitePress
# npm run docs:build or pnpm docs:build / yarn docs:build / bun run docs:build
run: |
bun run docs:build
touch docs/.vitepress/dist/.nojekyll
run: npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist

Expand All @@ -62,4 +59,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4

0 comments on commit 4d84cea

Please sign in to comment.