Skip to content

Commit 81c899e

Browse files
committed
github fixes
1 parent 013e3d1 commit 81c899e

File tree

2 files changed

+14
-29
lines changed

2 files changed

+14
-29
lines changed

.github/workflows/deploy.yml

Lines changed: 12 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,48 @@
1-
# Sample workflow for building and deploying a VitePress site to GitHub Pages
2-
#
3-
name: Deploy VitePress site to Pages
1+
name: Deploy docs (Fumadocs/Next.js) to GitHub Pages
42

53
on:
6-
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
7-
# using the `master` branch as the default branch.
84
push:
95
branches: [main]
106

11-
# Allows you to run this workflow manually from the Actions tab
127
workflow_dispatch:
138

14-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
159
permissions:
1610
contents: read
1711
pages: write
1812
id-token: write
1913

20-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
21-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
2214
concurrency:
2315
group: pages
2416
cancel-in-progress: false
2517

2618
jobs:
27-
# Build job
2819
build:
2920
runs-on: ubuntu-latest
3021
steps:
3122
- name: Checkout
3223
uses: actions/checkout@v4
3324
with:
34-
fetch-depth: 0 # Not needed if lastUpdated is not enabled
25+
fetch-depth: 0
26+
3527
- name: Setup Node
3628
uses: actions/setup-node@v4
3729
with:
3830
node-version: 20
39-
cache: yarn # or pnpm / yarn
31+
cache: npm
32+
4033
- name: Setup Pages
4134
uses: actions/configure-pages@v4
35+
4236
- name: Install dependencies
43-
run: yarn install # or pnpm install / yarn install / bun install
44-
- name: Build with VitePress
45-
run: yarn docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
46-
- name: Ensure static assets are copied
47-
run: |
48-
# Make sure the favicon is properly copied
49-
if [ -f "public/favicon.ico" ] && [ ! -f ".vitepress/dist/favicon.ico" ]; then
50-
cp public/favicon.ico .vitepress/dist/
51-
fi
52-
# Copy all public files not already in dist
53-
for file in public/*; do
54-
filename=$(basename "$file")
55-
if [ ! -f ".vitepress/dist/$filename" ]; then
56-
cp "$file" .vitepress/dist/
57-
fi
58-
done
37+
run: npm ci
38+
39+
- name: Build static site
40+
run: npm run build
41+
5942
- name: Upload artifact
6043
uses: actions/upload-pages-artifact@v3
6144
with:
62-
path: .vitepress/dist
45+
path: ./out
6346

6447
# Deployment job
6548
deploy:

next.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ const config = {
1212
reactStrictMode: true,
1313
outputFileTracingRoot: __dirname,
1414
typedRoutes: false,
15+
// Enable static export so we can deploy to GitHub Pages
16+
output: 'export',
1517
};
1618

1719
export default withMDX(config);

0 commit comments

Comments
 (0)