Skip to content

Update next.config.mjs #8

Update next.config.mjs

Update next.config.mjs #8

Workflow file for this run

# .github/workflows/docs.yml
name: GitHub Pages
on:
workflow_dispatch:
push:
branches: [main]
paths:
- '.github/workflows/docs.yml'
- 'docs/**'
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}
- name: Install dependencies
run: |
cd docs
pnpm install
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Build with VitePress
run: |
cd docs
pnpm run build
touch out/.nojekyll
- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./out
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4