Skip to content

Commit aad0d15

Browse files
committedJul 9, 2023
chore: pages deployment
1 parent 4efd4ab commit aad0d15

File tree

2 files changed

+56
-1
lines changed

2 files changed

+56
-1
lines changed
 

Diff for: ‎.github/workflows/pages.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Deploy to Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: 'pages'
16+
cancel-in-progress: false
17+
18+
jobs:
19+
pages:
20+
environment:
21+
name: github-pages
22+
url: ${{ steps.deployment.outputs.page_url }}
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v3
27+
28+
- name: Setup Pages
29+
uses: actions/configure-pages@v3
30+
31+
- name: Setup Node
32+
uses: actions/setup-node@v3
33+
with:
34+
node-version: '20'
35+
36+
- name: Install Dependencies
37+
run: npm i
38+
39+
- name: build
40+
env:
41+
BASE_PATH: '/'
42+
run: |
43+
npm run build
44+
touch ./build/.nojekyll
45+
46+
- name: Upload artifact
47+
uses: actions/upload-pages-artifact@v1
48+
with:
49+
path: './build'
50+
51+
- name: Deploy to GitHub Pages
52+
id: deployment
53+
uses: actions/deploy-pages@v2

Diff for: ‎svelte.config.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ const config = {
1111
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
1212
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
1313
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
14-
adapter: adapter()
14+
adapter: adapter({
15+
fallback: 'index.html'
16+
})
1517
}
1618
};
1719

0 commit comments

Comments
 (0)
Please sign in to comment.