Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix Github Pages Action example error #3169

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
38 changes: 31 additions & 7 deletions docs/guide/deploy.md
Expand Up @@ -156,25 +156,49 @@ Don't enable options like _Auto Minify_ for HTML code. It will remove comments f
uses: actions/checkout@v3
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
# Uncomment below if you're using pnpm
# - uses: pnpm/action-setup@v2
# name: Install pnpm
# with:
# version: 8
# run_install: false

# - name: Get pnpm store directory
# shell: bash
# run: |
# echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

# - uses: actions/cache@v3
# name: Setup pnpm cache
# with:
# path: ${{ env.STORE_PATH }}
# key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
# restore-keys: |
# ${{ runner.os }}-pnpm-store-

# Uncomment this if you're using Bun
# - uses: oven-sh/setup-bun@v1
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm # or pnpm / yarn
node-version: 20
cache: npm # or yarn
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Install dependencies
run: npm ci # or pnpm install / yarn install / bun install
run: npm install # or pnpm install / yarn install / bun install
- name: Build with VitePress
run: |
npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
touch docs/.vitepress/dist/.nojekyll
# if your project root not `.`, like `docs`, you should use `touch docs/.vitepress/dist/.nojekyll`
# see https://vitepress.dev/guide/getting-started#file-structure
touch .vitepress/dist/.nojekyll
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: docs/.vitepress/dist
# if your project root not `.`, like `docs`, you should use `touch .vitepress/dist`
# see https://vitepress.dev/guide/getting-started#file-structure
path: .vitepress/dist

# Deployment job
deploy:
Expand Down