Skip to content

Commit fae95de

Browse files
committed
depl
1 parent 604da03 commit fae95de

2 files changed

Lines changed: 66 additions & 1 deletion

File tree

.github/workflows/deploy.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: ['main']
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: 'pages'
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: ⬇️ Checkout Repository
22+
uses: actions/checkout@v4
23+
24+
- name: ⚙️ Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: 20
28+
cache: 'npm'
29+
30+
- name: 🛠️ Install Dependencies
31+
run: npm install
32+
33+
- name: 📄 Setup Pages
34+
uses: actions/configure-pages@v4
35+
with:
36+
static_site_generator: 'sveltekit'
37+
38+
- name: 🔨 Build Site (No BASE_PATH needed)
39+
run: npm run build
40+
41+
- name: 📤 Upload Artifact
42+
uses: actions/upload-pages-artifact@v3
43+
with:
44+
path: './build/'
45+
46+
deploy:
47+
environment:
48+
name: github-pages
49+
url: ${{ steps.deployment.outputs.page_url }}
50+
runs-on: ubuntu-latest
51+
needs: build
52+
steps:
53+
- name: 🚀 Deploy to GitHub Pages
54+
id: deployment
55+
uses: actions/deploy-pages@v4

svelte.config.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,17 @@ const config = {
77
// Consult https://svelte.dev/docs/kit/integrations
88
// for more information about preprocessors
99
preprocess: [vitePreprocess(), mdsvex()],
10-
kit: { adapter: adapter() },
10+
kit: {
11+
adapter: adapter({
12+
pages: 'build',
13+
assets: 'build',
14+
fallback: undefined,
15+
strict: true
16+
}),
17+
paths: {
18+
base: ''
19+
}
20+
},
1121
extensions: ['.svelte', '.svx']
1222
};
1323

0 commit comments

Comments
 (0)