Skip to content

Commit 3c4c763

Browse files
committed
ci: adds initial CI/CD pipeline for preview
1 parent 7c45a1d commit 3c4c763

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

Diff for: .github/workflows/deploy-preview.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Deploy a Preview Site
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: "latest"
16+
- run: npm install -g pnpm
17+
- run: pnpm install
18+
- run: pnpm run generate
19+
- name: Deploy to GitHub Pages
20+
uses: peaceiris/actions-gh-pages@v3
21+
with:
22+
github_token: ${{ secrets.GITHUB_TOKEN }}
23+
publish_dir: ./.output/public
24+
publish_branch: gh-pages
25+
destination_dir: docs/branch/${{ github.head_ref }}

Diff for: nuxt.config.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export default defineNuxtConfig({
55
compatibilityDate: "2024-04-03",
66
css: ["~/assets/css/main.postcss"],
77
devtools: { enabled: true },
8+
ssr: false,
89
modules: [
910
"nuxt-lucide-icons",
1011
"@nuxt/content",
@@ -26,4 +27,4 @@ export default defineNuxtConfig({
2627
linkExactActiveClass: "active",
2728
},
2829
},
29-
});
30+
});

0 commit comments

Comments
 (0)