Skip to content

Commit ca0e01e

Browse files
committed
trying to setup github pages
1 parent cb9d75b commit ca0e01e

File tree

8 files changed

+42
-100
lines changed

8 files changed

+42
-100
lines changed

.github/FUNDING.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/feature-request.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/deploy.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master # Or your default branch (e.g., master)
7+
workflow_dispatch:
8+
9+
jobs:
10+
build-and-deploy:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '20' # Or your preferred Node.js version
20+
cache: 'npm' # Or 'yarn', 'pnpm'
21+
22+
- name: Install dependencies
23+
run: npm install # Or pnpm install, yarn install
24+
25+
# Set the environment variable and run the generate script
26+
- name: Build and Generate Static Files
27+
# **IMPORTANT:** Replace 'repository-name' with your actual repository name
28+
run: NUXT_APP_BASE_URL=/<repository-name>/ npm run generate
29+
30+
- name: Deploy to GitHub Pages
31+
uses: peaceiris/actions-gh-pages@v3
32+
with:
33+
github_token: ${{ secrets.GITHUB_TOKEN }}
34+
publish_dir: ./.output/public # This is the directory with your generated files
35+
publish_branch: gh-pages # The branch to deploy to (GitHub Pages default)

.github/workflows/pkg.pr.new.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

nuxt.config.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@ import tailwindcss from '@tailwindcss/vite';
44

55
const currentDir = dirname(fileURLToPath(import.meta.url));
66

7+
//const base = process.env.NUXT_APP_BASE_URL || '/comforterpdocsnuxt/';
8+
79
export default defineNuxtConfig({
810
nitro: {
9-
preset: 'static',
10-
prerender: {
11-
crawlLinks: false,
12-
routes: ['/', '/docs/getting-started', '/about']
13-
}
11+
preset: 'github-pages',
1412
},
1513
ssr: true,
1614
devtools: {enabled: true},

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
"scripts": {
4040
"build": "nuxt prepare && nuxt build www",
4141
"dev": "nuxt prepare && nuxt dev www",
42-
"generate": "nuxt prepare && nuxt generate www",
42+
"generate2": "nuxt prepare && nuxt generate www",
43+
"generate": "NUXT_APP_BASE_URL=/comforterpdocsnuxt/ nuxt generate --preset github_pages",
4344
"preview": "nuxt prepare && nuxt preview www",
4445
"typecheck": "nuxt prepare && nuxt typecheck",
4546
"lint": "eslint .",
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ name: CI
33
on:
44
push:
55
branches:
6-
- main
6+
- master
77

88
pull_request:
99
branches:
10-
- main
10+
- master
1111

1212
jobs:
1313
lint:

0 commit comments

Comments
 (0)